Skip to content

Instantly share code, notes, and snippets.

@alkema
alkema / id.css
Last active August 29, 2015 14:13 — forked from andyvanee/id.css
/* id styling has widespread effects */
#site a { padding-left: 10px; }
/* does nothing */
li a { padding-left: 10px; }
/* also does nothing */
.sidebar li:first a { padding-left: 10px; }
# RED="\[\033[0;31m\]"
# YELLOW="\[\033[0;33m\]"
# GREEN="\[\033[0;32m\]"
# PS1="$RED\$(date +%H:%M) \w$YELLOW \$(parse_git_branch)$GREEN\$ "
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo "!"
}
MBP:~ ed$ ruby -e 'while line = gets; puts line.split; end' <~/Desktop/generated_query.sql | grep JOIN | wc -l
15
MBP:~ ed$ gem install launchy
MBP:~ ed$ launchy http://www.amazon.com/Great-Gonzos-Best-Ted-Nugent/dp/B00001X599
@alkema
alkema / twat.rb
Created April 6, 2009 21:54 — forked from Aupajo/twat.rb
#!/usr/bin/env ruby
# Find common Twitter friends
# Usage: ./twat.rb user1 user2 ...
lists = ARGV.inject({}) do |hash, username|
page = 0
while !(output = `curl -s http://twitter.com/statuses/friends/#{username}.xml?page=#{page += 1} | grep "<screen_name>"`.gsub(%r{</?screen_name>}, '').split).empty?
hash[username] = ((hash[username] || []) + output).sort
end
hash