Skip to content

Instantly share code, notes, and snippets.

gem: --no-ri
rdoc: --inline-source --line-numbers --fmt=html --template=hanna
gem install hanna
gem rdoc --all --overwrite
gem install hanna
def convert(str)
x = str.to_i(base=16)
x/255.0
end
hex_value = ARGV[0].strip
alpha = ARGV[1] || 1.0
red, green, blue = convert(hex_value[0,2]), convert(hex_value[2,2]), convert(hex_value[3,2])
# Is this good? Like on a scale of 1 - 10, 1 being, "oh god my eyes the burning I can't even"
# and 10 being, "DO IT MOAR!"
class Document
attr_accessor :foo, :bar
def initialize
if block_given?
yield self
end
def login
twitter_client = TwitterOAuth::Client.new(:consumer_key => TWITTER_CONSUMER_KEY, :consumer_secret => TWITTER_CONSUMER_SECRET)
if !returning_from_twitter?
request_token = twitter_client.request_token(:oauth_callback => url_for(:login))
session[:request_token] = request_token.token
session[:request_token_secret] = request_token.secret
redirect_to request_token.authorize_url
else
twitter_client.authorize(
runtime! autoload/pathogen.vim
if exists('g:loaded_pathogen')
call pathogen#runtime_prepend_subdirectories(expand('~/.vimbundles'))
end
colorscheme native
set tabstop=2
set smarttab
1 tbsp olive oil 15 mL
1 small onion
3 cloves garlic, minced
1 tsp chili powder 5 mL
1 tsp ground cumin 5 mL
1 1/3 cups ketchup 325 mL
2/3 cup dr. pepper 150 mL
1/4 cup soy sauce 60 mL
1/4 cup cider vinegar 60 mL
1 drop liquid smoke
MBP:~ ed$ ruby -e 'while line = gets; puts line.split; end' <~/Desktop/generated_query.sql | grep JOIN | wc -l
15