Skip to content

Instantly share code, notes, and snippets.

@jpterry
jpterry / gist:4711762
Created February 5, 2013 02:53
Including a module in ruby inherits nested classes. This is an example.
module JohnsThings
class AwesomeTool
def is_awesome?
true
end
end
end
class HurricaneTool
include JohnsThings
@jpterry
jpterry / gist:4172439
Created November 29, 2012 22:51
Lists the files being played by itunes. Including what home sharing users are listening to.
# A neat trick to find out what embarrassing songs in your library your family or coworkers are listening to.
# Execute this in terminal
lsof +p $(pgrep -x iTunes) | grep iTunes\ Music/Music