Skip to content

Instantly share code, notes, and snippets.

@jamiecurran
jamiecurran / gist:5734775
Last active December 18, 2015 05:39
rvm - commands
rvm get stable
rvm list known
rvm install ruby-2
rvm --create --ruby-version use ree@tedxperth
du -d 1 -h | sort -h -r
ctrl+b o = swap panes
ctrl+b " = create vertical pane
@jamiecurran
jamiecurran / gist:6069448
Created July 24, 2013 10:21
What distro am I running?
lsb_release -a
@jamiecurran
jamiecurran / gist:6124037
Created July 31, 2013 17:14
find with some sed.
find . -name '*.load' -type f -exec sed -i.bak "s/lib\/apache2\/modules/libexec\/apache2/g" {} \;
@jamiecurran
jamiecurran / gist:7706483
Created November 29, 2013 14:30
List partitions
lsblk
@jamiecurran
jamiecurran / gist:7741907
Last active December 29, 2015 23:19
Identifying keyboard keys
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
@jamiecurran
jamiecurran / gist:8271908
Last active January 2, 2016 07:48
ipad mini ffmpeg
ffmpeg -i 00091.MTS -r 30 -strict -2 -async 1 -acodec aac -ac 2 -ab 160k -threads 0 -preset slower -profile:v high -level 4.1 -f mp4 -refs 4 ~/videos/conversions/00091.mp4
@jamiecurran
jamiecurran / gist:8275097
Created January 5, 2014 22:47
find all .mts file, convert to ipad friendly mp4.
IFS=$'\n'
for f in `find *.MTS`; do ffmpeg -i $f -r 30 -strict -2 -async 1 -acodec aac -ac 2 -ab 160k -threads 0 -preset slower -profile:v high -level 4.1 -f mp4 -refs 4 $(basename $f .MTS).mp4; done
@jamiecurran
jamiecurran / gist:8517731
Last active January 3, 2016 20:49
update all git repos
IFS=$'\n'; for d in `find * -maxdepth 0 -type d`; do git -C $d pull --rebase; done