Skip to content

Instantly share code, notes, and snippets.

Section "InputClass"
Identifier "Keyboard Defaults"
MatchIsKeyboard "yes"
Option "XkbOptions" "caps:super,terminate:ctrl_alt_bksp"
EndSection
Section "InputClass"
Identifier "Apple Keyboards"
MatchUSBID "05ac:0259"
[NOTICE: Zone booting up]
init: Unable to mount /sys filesystem: Function not implemented
<4>init: procps (virtual-filesystems) main process (19850) terminated with status 139
<4>init: Temporary process spawn error: Interrupted system call
<4>init: Temporary process spawn error: Interrupted system call
<4>init: Temporary process spawn error: Interrupted system call
<4>init: failsafe post-start process (19917) killed by SEGV signal
<4>init: upstart-socket-bridge main process ended, respawning
<4>init: Temporary process spawn error: Interrupted system call
<4>init: networking main process (19891) terminated with status 2
@psanford
psanford / gist:229d46edfc5242bffddf
Last active August 29, 2015 14:22
ec2 instance type history
Date Instances
[August 2006][0] m1.small
[October 2007][1] m1.large, m1.xlarge
[May 2008][2] c1.medium, c1.xlarge
[October 2009][3] m2.2xlarge, m2.4xlarge
[February 2010][4] m2.xlarge
[July 2010][5] cc1.4xlarge
[September 2010][6] t1.micro
[November 2010][7] cg1.4xlarge
@psanford
psanford / gist:242a1222571fd418745a
Created July 30, 2015 21:09
binary over telnet/netcat
# send binary as hex over telnet
cat file | od -A n -v -t x1 | tr -d ' \n' | telnet x.x.x.x 1337
# convert from hex to binary over netcat
nc -l 1337 | xxd -r -p > /tmp/binary
avrdude -q -q -pm168 -cstk500v1 -P/dev/ttyUSB0 -b19200 -D -F -Uflash:w:file.hex:i
@psanford
psanford / dvb.sh
Last active September 15, 2015 00:15
dvb dtv scanning notes
# speak the signal strength out loud
script -c "azap -c ~/.mplayer/channels.conf -r 'KNTV HD'" /dev/null | perl -nl -e '$|=1; /signal ([a-zA-Z0-9]+).*FE_HAS_LOCK/; `echo $1 | festival --tts`; '
#yes or no
script -c "azap -c ~/.mplayer/channels.conf -r 'KNTV HD'" /dev/null | tee /tmp/azap | perl -nl -e '$|=1; /signal ([a-zA-Z0-9]+).*FE_HAS_LOCK/; $out=$1 eq "541d" ? "no": "yes" ; `echo $out | festival --tts` ; '
# edit /usr/share/festival/voices/english/kal_diphone/festvox/kal_diphone.scm to adjust speech rate
(Parameter.set 'Duration_Stretch 0.5)
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAnU/bhkAQZo6UwQJDIYU5/8e1rqGqJa1XLrMU73C970zYkIey+5aCNJYqo2oYulXgfjCDmBQNwQyrAR5zbGKJwxZY1CP6yzWxBPZNQ9BpevF2SEt1ps4LFDpvzHR2KCxJfORYqoXT3iVeejwB9gV51yuuDm4F23sGLVTbpM6IBJTpmJl2JsDYa/to6FbLpovWw+rIX0+f3LbqriXSjItK3EZehvapQxzDyoGROIynxSx7SlTfBK043Az4L2VcI3+5UmlEbGXL1s+Q5AkRTfr+y+CWlX65WzVtwoiiPKRajAaiifTAbBKaxtJ6s7A0+PGvEv1P7w57mQqxYvoDvnWqAQ== psanford@Peters-MacBook-Pro.local
#disable nautilus desktop
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop false
#kill stupid sounds
sudo aptitude remove ubuntu-sounds
#set wm
echo "export WINDOW_MANAGER=/usr/bin/fvwm" >> ~/.gnomerc
@psanford
psanford / xmodmap
Created May 1, 2011 20:31
macbook xmodmap
! xmodmap for my macbook pro (7,1) running linux
! command should act as meta
! caps and option sould act as super
! command
keycode 133 = Meta_L
! option
keycode 64 = Super_L
!capslock
keycode 66 = Super_L
@psanford
psanford / keyboard-init.sh
Created May 8, 2011 18:41
keyboard initialization via setxkbmap
#!/bin/sh
#set caps to super
setxkbmap -option caps:super
#swap command and option for apple keyboard
setxkbmap -device `xinput list | grep -o -P 'Apple Internal Keyboard / Trackpad\s+id=\d+' | grep -o -P '\d+'` -option altwin:swap_lalt_lwin