VirtualTam's bookmarks

  1. Context: replace spaces by dashes in a script-generated HTML file's links

    1awk -F\' 'm = /a href/ { gsub(/ /,'-',$2); print$1'\''$2'\''$3} !m {print $0}'
    
  2. Pro: no need to setup a DNS server to test virtualhosts Con: keep in mind that all "fake" hosts will point to 127.0.0.1!

    1. Use /etc/hosts to declare test hosts / domains / subdomains
    #<ip-address>	<hostname.domain.org>	<hostname>
    127.0.0.1	localhost.localdomain	localhost
    127.0.0.1	host.localdomain	host
    127.0.0.1	sub.host.localdomain	sub.host
    ::1		localhost.localdomain	localhost
    
    1. Allow per-user virtualhost definition in either (depending on your distro)
    • /etc/httpd/conf/httpd.conf
    • /etc/apache2/apache2.conf

    Include /home/albert/.httpd/*.conf

    1. Profit! Create virtualhosts with local hostnames :)
  3. Unboxing Minitel 1 2015-05-26

    Trve Minitel 1.0 build #3615

  4. # /etc/modprobe.d/snd_usb_audio.conf
    options snd_usb_audio vid=<vid1>,<vid2> pid=<pid1>,<pid2> index=<index1>,<index2> enable=1,1
    

    example:

    # 5: M-Audio Fast Track Pro 
    # 6: Focusrite Scarlett 6i6
    options snd_usb_audio vid=0x763,0x1235 pid=0x2012,0x8012 index=5,6 enable=1,1
    

    See also: http://alsa.opensrc.org/MultipleCards