This file contains 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 Candidate | |
attr_accessor :ambition, :location, :education, :skills | |
def initialize person | |
@ambition = person.ambition | |
@location = person.location | |
@education = person.education | |
@skills = person.skills | |
end | |
end |
This file contains 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
nmap <leader>rh :%s/\v:(\w+) \=\>/\1:/g<cr> |
This file contains 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
require 'rspec' | |
#http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx | |
class String | |
def hashKey | |
rot_hash | |
end |
This file contains 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
rvm env . > .powenv | |
touch tmp/restart.txt |
This file contains 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 Walrus | |
attr_reader :energy | |
def initialize | |
@energy = 0 | |
end | |
def receive_gift!(gift) | |
if gift.edible? | |
@energy += gift.digest.energy |
This file contains 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 LRUCache | |
def initialize(size = 10) | |
@size = size | |
@store = {} | |
@lru = [] | |
end | |
def set(key, value) | |
@store[key] = value |
This file contains 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 Cache | |
attr_accessor :max_size | |
def initialize | |
@max_size = 99 | |
@cache = {} | |
end | |
def store(key,object) | |
@cache[key] = [0,object] | |
purge_old | |
key |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?><Response><Play>http://izerion.com/da1392f0-460b-012f-74be-3c07544054a5.wav?asdf</Play></Response> |
This file contains 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
alias app_setup='br db:drop:all && br db:create:all && br dsi:schema:load && br db:schema:load && br db:seed' |
This file contains 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/bash | |
BASEDIR=http://build.chromium.org/f/chromium/snapshots/Mac | |
mkdir -p /tmp/chromium_nightly | |
cd /tmp/chromium_nightly | |
echo "Downloading number of latest revision" | |
REVNUM=`curl -# $BASEDIR/LATEST` | |
echo "Found latest revision number $REVNUM, starting download" |
NewerOlder