Skip to content

Instantly share code, notes, and snippets.

View kiwhite's full-sized avatar

Kristopher Ian White kiwhite

View GitHub Profile
@kiwhite
kiwhite / sshuttleEverything.sh
Created October 14, 2011 15:27
SSHuttle, send all traffic
#! /bin/bash
$REMOTE_SERVER='somewhere.far.away'
sudo sshuttle 0/0 -vNHr $USER@$REMOTE_SERVER
@kiwhite
kiwhite / avi2mp4.sh
Created October 14, 2011 15:28
Convert AVI to MP4 with ffmpeg
#! /bin/bash
echo "Enter filename in current directory:"
read VID
if [ -f $VID ]
then
echo "Found ${VID}... Starting ffmpeg."
ffmpeg -i $VID -y -f mp4 -vcodec libx264 -crf 28 -threads 0 -flags +loop -cmp +chroma -deblockalpha -1 -deblockbeta -1 -refs 3 -bf 3 -coder 1 -me_method hex -me_range 18 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 320 -keyint_min 25 -level 41 -qmin 10 -qmax 51 -qcomp 0.7 -trellis 1 -sc_threshold 40 -i_qfactor 0.71 -flags2 +mixed_refs+dct8x8+wpred+bpyramid -padcolor 000000 -padtop 0 -padbottom 0 -padleft 0 -padright 0 -acodec libfaac -ab 80kb -ar 48000 -ac 2 `basename $VID avi`'mp4'
else
echo "Not a file, exiting..."
fi
@kiwhite
kiwhite / connectedListeners.applescript
Created September 19, 2012 10:16
Show connected listeners in iTunes
do shell script "netstat | grep daap"