Skip to content

Instantly share code, notes, and snippets.

@ckolderup
ckolderup / madlibs.rb
Created May 24, 2011 04:39
Peter's Shoes Madlib program
#Nunca Mas Mad Libs by p.holby
#pholby@gmail.com
#I think I'm doing this right putting this info here I don't know I am new at this
#(Editor's note: more information available at http://sorryeveryone.tumblr.com/post/5758964399 )
Shoes.app :height => 750, :width => 800, :title => "Nunca Mas Mad Libs" do
background "#E6B8B8".."#A18181"
title "National Commission on the Disappearance of Persons 1984
Mad Libs!", :top => 25,
:align => "center",
@ckolderup
ckolderup / shoes_helper.vim
Created May 22, 2011 22:02
Vim: Bind F2 to open current .rb file as a Shoes app on MacOS
nmap <F2> :!open %:p -a Shoes<CR>
@ckolderup
ckolderup / gist:963816
Created May 10, 2011 02:22
woman loads manpages from man.cx in w3m
#woman loads manpages from man.cx in w3m, since you sometimes don't get them via homebrew (for good reason: http://goo.gl/zvwvp)
#use `woman w3m` to view the manpage for w3m.
#use `woman 2 wait` to view the page for "wait" from section 2 if you really need this for some reason, I dunno, whatevs
brew install w3m; echo "woman() { if [ \$# -eq 2 ]; then w3m \"http://man.cx/\$2(\$1)\"; else w3m \"http://man.cx/\$1\"; fi; }" >> ~/.bashrc; source ~/.bashrc
-e x264 -q 20.0 -r 29.97 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m
set lines=35
set columns=90
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=R
set guioptions-=l
set guioptions-=L
set bg=dark
colorscheme molokai
pwd = Dir.new('.')
pwd.entries.select do |e|
next unless /^.+\.csv$/.match(e)
IO.readlines(e).each do |line|
arr = line.split(',')
id = arr[0]
source = arr[6]
puts id.gsub('"', '') if /#{ARGV[0]}/.match(source)
end
end
Rick Wakeman – Shear [sic] Terror
Juggaknots – Loosifa
Clap Your Hands Say Yeah – Satan Said Dance
Holocaust – Sinister
Sampson, Jokez, Nokes, Zach & Jesse D – Crazymen
Gravediggaz – Zig Zag Chamber
Sixtoo – Caukazoid Germ
Buck 65 – Chip Chop
Lovage – Archie & Veronica
Goodie Mob – Cell Therapy
@ckolderup
ckolderup / gist:efb9ff0635eee61ab3fb
Created October 9, 2014 20:10
get titles of all top hacker news stories
curl -s -S "https://hacker-news.firebaseio.com/v0/topstories.json" | jq ".[]" | xargs -I % curl -s -S "https://hacker-news.firebaseio.com/v0/item/%.json" | jq ".title"
@ckolderup
ckolderup / Gemfile
Created July 8, 2014 19:20
drilsay - make your OS X install read wint to you whenever he tweets
source 'https://rubygems.org'
gem 'tweetstream'
gem 'foreman'
curl -s "http://www.avatarpro.biz/avatar?s=500" | curl -s -F file=@- cga.graphics/api/convert/ > `openssl rand -base64 6`.png