Skip to content

Instantly share code, notes, and snippets.

View bucchere's full-sized avatar

Christopher Bucchere bucchere

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bucchere on github.
  • I am bucchere (https://keybase.io/bucchere) on keybase.
  • I have a public key ASDAWbt08SzFw_rWRAKSYto01ZeWYwMK6GnSERXJSHgcIAo

To claim this, I am signing this object:

@bucchere
bucchere / log2self.rb
Created January 16, 2013 22:39
Force logger output into the rails cosole
ActiveRecord::Base.logger = Logger.new(STDOUT)
@bucchere
bucchere / disk_usage.sh
Created January 4, 2013 19:56
Human-readable disk usage, sorted in ascending order by size
du -sk * | sort -n | while read size fname; \
do for unit in k M G T P E Z Y;
do \
if [ $size -lt 1024 ]; \
then echo -e "${size}${unit}\t${fname}"; \
break; \
fi; \
size=$((size/1024)); \
done; \
done
@bucchere
bucchere / .rvmrc
Created January 4, 2013 19:43
Place in project directory to automagically set the rvm environment and gemset
rvm use env@gemset
@bucchere
bucchere / ssh_tunnel.sh
Created January 4, 2013 19:42
Set up an ssh tunnel from localhost:1234 to hostname:5678
ssh -N -v -o ControlMaster=auto -o ExitOnForwardFailure=yes -o ConnectTimeout=10 \
-o NumberOfPasswordPrompts=3 -o TCPKeepAlive=no -o ServerAliveInterval=60 \
-o ServerAliveCountMax=1 username@hostname -L 1234/192.168.111.111/5678