Skip to content

Instantly share code, notes, and snippets.

Avatar

Vinicius Baggio Fuentes vinibaggio

View GitHub Profile
@erikh
erikh / hack.sh
Created Mar 31, 2012 — forked from DAddYE/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@zaius
zaius / background.sh
Created Jan 16, 2011
How to redirect a running process output to a file and log out
View background.sh
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)
View an_intro.textile

If one was inclined to use the acts_as_yaffle pattern, they would probably use the second one, rather than the heavily cargo-culted first one.