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" |
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
So recently the Louvre was rid of some of its most prized possessions. This brilliant thief managed to break in, remove several paintings, escape, and load them into his van without setting off a single alarm. Fortunately, the criminal was caught a few miles down the road, with his vehicle unable to move. | |
When the police questioned him about how he could mastermind a brilliant heist, yet forget to put fuel in his van, the thief responded, "You see, I did not have the Monet to buy Degas to make the Van Gogh." |