This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hash | |
def keeping(keys = []) | |
raise 'Please specify at least one key!' if keys.empty? | |
strkeys = keys.collect {|k| k.to_s} | |
self.clone.delete_if {|k,v| !strkeys.include?(k.to_s)} | |
end | |
end | |
# Tests! | |
h = {:kyle => 'Bragger', :patrick => 'Ewing'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Back up your iTunes library to S3 | |
git clone git://github.com/sstephenson/mackerel.git | |
ruby -rubygems mackerel/examples/itunes_backup.rb amazon-s3://YOUR_ACCESS_KEY_ID:[email protected]/YOUR_BUCKET_NAME/itunes.mackerel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin __ __ | |
__ __ \_\ __ __ \_\ __ __ __ | |
\_\ /_/ \/_/ /_/ \/_/ \_\ /_/ | |
.-. \.-./ .-. .-./ .-. .-./ .-. .-\ .-. \.-./ .-. | |
//-\\_//-\\_//-\\_//-\\_//-\\_//-\\_// \\_//-\\_//-\\_//-\\_//-\\ | |
__( '-' '-'\ '-' '-' /'-' '-'\__'-' '-'__/'-' '-'\__ | |
/_/)) \__ __/\ \_\ /_/ \_\ | |
___\_// \_\ /_/ \__ | |
/_/ (( \_\ | |
)) __ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xcode | |
http://developer.apple.com/technology/xcode.html | |
[OR] | |
Mac OS X install disc 2 | |
GNU wget | |
http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz | |
Git | |
http://code.google.com/p/git-osx-installer/ |
NewerOlder