Skip to content

Instantly share code, notes, and snippets.

View hoverbird's full-sized avatar
💭
Neo Cab is out now on Apple Arcade, Steam and Nintendo Switch!

Phenry Ewing hoverbird

💭
Neo Cab is out now on Apple Arcade, Steam and Nintendo Switch!
View GitHub Profile
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/
=begin __ __
__ __ \_\ __ __ \_\ __ __ __
\_\ /_/ \/_/ /_/ \/_/ \_\ /_/
.-. \.-./ .-. .-./ .-. .-./ .-. .-\ .-. \.-./ .-.
//-\\_//-\\_//-\\_//-\\_//-\\_//-\\_// \\_//-\\_//-\\_//-\\_//-\\
__( '-' '-'\ '-' '-' /'-' '-'\__'-' '-'__/'-' '-'\__
/_/)) \__ __/\ \_\ /_/ \_\
___\_// \_\ /_/ \__
/_/ (( \_\
)) __
# 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
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'}
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'}
@hoverbird
hoverbird / quix_commands.txt
Created January 24, 2010 23:54
My Quix Commands
> 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
#!/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
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)
/*-------- 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')
@hoverbird
hoverbird / argh.rb
Created July 17, 2011 14:28 — forked from robinsloan/argh.rb
Arghhhh
# 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)