This file contains hidden or 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
class Player | |
MAX_HEALTH = 20 | |
DYING_HEALTH = 10 | |
def me | |
@game[:me] | |
end |
This file contains hidden or 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
From the Dawn of Time it came. | |
You'll need a spice grinder, a skillet, and either a dutch oven or a really | |
large sauce pan with a lid. Or maybe a small stock pot. | |
First the Chili Powder: | |
makes 1/2 cup -- needless to say, you should be grinding the chilis and cumin fresh. | |
Grind the following dried chilis: |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [[ -z $1 ]]; then | |
echo "usage: deploy \"commit message\"" | |
else | |
echo "Deploying with commit message: $1" | |
cd output | |
git add . | |
git commit -am "$1" |
This file contains hidden or 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
#!/bin/env bash | |
for x in `seq 1 20`; do | |
for y in `seq 1 20`; do | |
for n in n s; do | |
for e in e w; do | |
wget "http://imgs.xkcd.com/clickdrag/${x}${n}${y}${e}.png" | |
sleep 1 | |
done | |
done |
This file contains hidden or 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
# Configure Riak connections for the Ripple library. | |
development: | |
#http_port: 8092 | |
# pb_port: 8087 | |
nodes: | |
- host: 192.168.31.2 | |
http_port: 8092 | |
- host: 127.0.0.1 | |
http_port: 8091 |
This file contains hidden or 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
expect { | |
touched.each { |life| experience << life unless life.empty? } | |
}.to change direction |
This file contains hidden or 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains hidden or 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
Role.delete_all | |
role_names = Authorization::Engine.instance.roles | |
role_names.each { |name| Role.find_or_create_by_name!(name) } |
This file contains hidden or 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
# any help with the following would be awesome (@bvandgrift) | |
# here's the problem code (ish) | |
# testing the stuff in the 'chunkify' block sucks | |
def make_breakfast | |
# ... | |
dough_for_biscuits = DoughBro.new | |
dough_for_biscuits.chunkify do |chunk| | |
if chunk.any? | |
the_good_stuff = roll_dem_biscuits(chunky) |
This file contains hidden or 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
# throw something like this in an initializer | |
ActionController::Base.class_eval do | |
self.prepend_view_path "first/search/here" | |
# then the defaults (app/views/*) | |
self.append_view_path "then/search/here" | |
end | |
# an example, say you want a theme, and the name is stored in App.theme_name? | |
ActionController::Base.class_eval do | |
self.prepend_view_path "themes/#{App.theme_name}" |