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
>> o = GitHub.org('github') | |
=> #<GitHub::Organization avatar_url="https://secure.gravatar.com/avatar/61024896f291303615bcd4f7a0dcfb74?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png" blog="https://github.com/about" company=nil created_at="2008-05-11T04:37:31Z" email="support@github.com" followers=622 following=0 html_url="https://github.com/github" id=9919 location="San Francisco, CA" login="github" name="GitHub" public_gists=0 public_repos=36 type="Organization" url="https://api.github.com/orgs/github"> | |
>> o.login | |
=> "github" | |
>> o.id | |
=> 9919 | |
>> o.company | |
=> nil # yes, this is right. it's nil above, which is what the api returns for whatever reason | |
>> o.type | |
=> "Organization" |
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
def helper from_edge, number | |
twopi = Shoes::TWO_PI | |
angle1 = twopi / 4 * 3 | |
angle2 = (angle1 + number * twopi) % twopi | |
width = @clock.width | |
radius = width - from_edge * 2 | |
arc width / 2, width / 2, radius, radius, angle1, angle2 | |
end |
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 'underscore' | |
# merge all the objects together into one | |
# e.g. | |
# merge({ one: 1, two: 5 }, { two: 2 }) | |
# { one: 1, two: 2 } | |
merge = (objects...) -> | |
result = {} | |
for obj in objects | |
_(obj).each (value, key) -> |
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
irc = require 'irc' | |
twitter = require 'ntwitter' | |
bot = new irc.Client 'irc.mcintec.net', 'node', | |
channels: ['#twitter'] | |
twit = new twitter | |
consumer_key: '' | |
consumer_secret: '' | |
access_token_key: '' |
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
module.exports = parse = (str) -> | |
origin = null | |
command = null | |
args = [] | |
# pull out the origin if there is one | |
if str[0] is ':' | |
i = str.indexOf ' ' | |
origin = str.slice 1, i | |
str = str.slice i + 1 |
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
source :rubygems | |
gem 'foreman' | |
gem 'stalker' | |
gem 'clockwork' |
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
%ul | |
%li dick1 | |
%li dick2 |
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
# conway's game of life | |
col = 50 | |
row = 50 | |
# set this up however you want, i like randomness. | |
env = col.times.map { row.times.map { 0 == rand(2) } } | |
loop do | |
puts "-" * col |
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
shot() { | |
for file in "/Users/andrew/Desktop/Screen Shot"* | |
do | |
hash=`shasum $file | awk '{ print $1 }'` | |
new="$hash.png" | |
mv $file "/Users/andrew/Dropbox/Public/files/$hash.png" | |
echo "$file => http://dl.dropbox.com/u/5489165/files/$hash.png" | |
done | |
} |
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
cl_ragdoll_physics_enable 0 | |
alias _voice_toggle _voice_on | |
alias _voice_on "alias _voice_toggle _voice_off; +voicerecord" | |
alias _voice_off "alias _voice_toggle _voice_on; -voicerecord" | |
alias _demo_pause_toggle _demo_pause_on | |
alias _demo_pause_on "alias _demo_pause_toggle _demo_pause_off; demo_pause" | |
alias _demo_pause_off "alias _demo_pause_toggle _demo_pause_on; demo_resume" |