I hereby claim:
- I am adamcarlile on github.
- I am adamcarlile (https://keybase.io/adamcarlile) on keybase.
- I have a public key ASBkVmMunv_EHnINy5nyPsm6vNuwUfjc_e30rsYJr87TQgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'faraday' | |
conn = Faraday.new(url: 'https://www.crowdcube.com') do |faraday| | |
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP | |
end | |
success = false | |
until success | |
begin | |
response = conn.get('/investment/mondo-20857') |
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="eastwood" | |
# Example aliases |
This game requires a decent group of people at a party, maybe 6-10, and a case or two (read: five). Also, duct tape.
Start of the night by explaining the game in it's entirety, while everyone is cracking their first beer or so. Get everyone in on it, more fun that way.
The idea of the game is to drink beer, and level up your Wizardly skills. Once you finish a beer, you get a new beer, and tape it to the top of the old can. This puts you at level 2 (2 cans). Drink that beer, get new beer, tape to top of old beer can, welcome to level 2. You get the idea. In case you haven't figured it out by now, you are constructing a staff.
Your staff is an indicator of your level of Wizardry and intoxication. It also brings me to the most entertaining part of the game- spells. More spells are unlocked by being a higher level, and they typically will cost cans to cast. Here's a list of spells, but feel free to fuck with these.
require 'active_support/core_ext' | |
class Hash | |
def rubyfy_keys! | |
keys.each do |key| | |
self[(key.underscore rescue key) || key] = delete(key) | |
end | |
self | |
end |
heroku addons:add deployhooks:http url="http://airbrake.io/deploys.txt?deploy[rails_env]=YOUR_ENVIRONMENT&api_key=YOUR_API_KEY&deploy[local_username]={{user}}&deploy[scm_repository]=git@github.com:youruser/your-repo.git&deploy[scm_revision]={{head}}" --app heroku_app_name |
module ExtraFields | |
def self.included(base) | |
base.serialized_fields.each do |method_name| | |
base.class_eval <<-EOS | |
def #{method_name.to_s} | |
extra_fields[:#{method_name}] if extra_fields && extra_fields[:#{method_name}] | |
end | |
def #{method_name.to_s}=(value) | |
self.extra_fields[:#{method_name}] = value |
def render_user_status | |
if user_signed_in? | |
inner_html = content_tag(:span, "Signed in as #{current_user.email}. Not you? \n #{link_to("Sign out", destroy_user_session_path)}") | |
else | |
inner_html = content_tag(:span, "#{link_to("Sign up", new_user_registration_path)} \n or \n #{link_to("Sign in", new_user_session_path)}") | |
end | |
return content_tag(:div, inner_html, :id => "user_nav") | |
end |
module GravatarHelper | |
def gravatize(email, options={}) | |
default_options = {:size => 60} | |
options = default_options.update(options) | |
crypted_email = Digest::MD5.hexdigest(email) | |
output = "http://www.gravatar.com/avatar/#{crypted_email}?s=#{options[:size]}" | |
return image_tag(output) | |
end |