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/ |
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
# 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
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
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
> This is a Quix Command File | |
> | |
> For the syntax of this file, please refer to http://quixapp.com/syntax/ | |
> | |
@hoverbird's extra commands | |
rl javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body,l=d.location;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src',l.protocol+'//www.instapaper.com/j/vivorXYWdEDu?u='+encodeURIComponent(l.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0) Read Later with Instapaper | |
ip http://www.instapaper.com/u Instapaper |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'pp' | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
IRB.conf[:AUTO_INDENT] = true |
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
require "twitter" | |
myname = "hoverbird" | |
pw = "secretpasswordhere" | |
auth = Twitter::HTTPAuth.new(myname, pw) | |
t = Twitter::Base.new(auth) | |
# If your client (stored in the variable t) is connected, this should work | |
me = t.user(myname) |
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
/*-------- Here's how your Gists render in #newtwitter's details pane --------*/ | |
twttr.mediaType('twttr.media.types.Gist') | |
.url('http://gist.github.com') | |
.matcher(/\b(?:https?\:\/\/)?gist\.github\.com\/(\S+)/g) | |
.icon('generic') |
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
# 4<w<8, 1<y<10, x and z are 6-sided dice. | |
HOW_MANY = 100000 | |
def range_rand(min,max) | |
min + rand(max-min) | |
end | |
def test_it | |
w = range_rand(4,8) |
OlderNewer