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 Generation < Struct.new(:members) | |
def to_a | |
members | |
end | |
def sort | |
members.sort! do |a,b| | |
a.score <=> b.score | |
end | |
self |
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
raptor(1m|master) $ find ./lib -name "*.rb" -print | xargs wc -l | |
33 ./lib/raptor/delegation.rb | |
67 ./lib/raptor/inference.rb | |
85 ./lib/raptor/responders.rb | |
206 ./lib/raptor/router.rb | |
17 ./lib/raptor/shorty.rb | |
86 ./lib/raptor.rb | |
494 total | |
raptor(1m|master) $ git log | wc -l | |
195 |
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
pc-3-97:raptor-perf(326m|master) $ script/statistics master "master^" > stats.csv | |
=> git rev-list --reverse master..master^ | |
=> git checkout --quiet master^ | |
OK for all revisions! | |
pc-3-97:raptor-perf(338m|master~1?) $ cat stats.csv | |
Hash,XXX Count,Require Time,Prod Lines,Spec Lines,Spec Count,Spec Runtime,Spec End-to-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
As ruby developers, we (mostly) aspire to early and continuous delivery of valuable software.This hands-on workshop will test how well you can meet that goal by challenging you to code a simple robot that will have to compete in a series of battles. | |
You can continue to refine and upgrade your robot though the tournament. The earlier you release your robot, the sooner you will win some battles and start accruing points. |
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/sh | |
# Run this on an empty Heroku app: | |
# heroku create -s cedar my-haskell | |
# heroku run bash --app my-haskell | |
curl ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2 | tar -xjvf - | |
cd gmp-5.0.2 | |
./configure -prefix /app/gmp | |
make install |
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
{ | |
:current_user => "CurrentUser.current_user" | |
} |
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
pc-3-97:raptor(8161m|master) $ bundle | |
ERRRO: Gem bundler is not installed, run `gem install bundler` first. | |
pc-3-97:raptor(8161m|master) $ gem install bundler | |
Successfully installed bundler-1.0.21 | |
1 gem installed | |
Installing ri documentation for bundler-1.0.21... | |
Installing RDoc documentation for bundler-1.0.21... | |
pc-3-97:raptor(8161m|master) $ bundle | |
ERRRO: Gem bundler is not installed, run `gem install bundler` first. | |
pc-3-97:raptor(8161m|master) $ cd .. |
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 Quartz import * | |
import time as time | |
KEYCODES = { | |
#q12 | |
#w13 | |
#e14 |
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
Isolation vs Rails: More Fastererer Speedy Mk II Edition | |
There is a vast set of tools and patches to speed up Rails boot time. What happens if, instead of testing inside Rails, we isolate our specs from Rails? What benefits can be gained from isolating our testing? Whilst test execution time is an obvious benefit, there are more subtle nuances to isolation. |
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/bash | |
# assuming `origin (push)` is a github url, | |
# this opens the current branch on github's site, | |
# ready for a pull request | |
# only works on macs right now (it uses `open`) | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' -e 's/)//' -e 's/(//' | |
} |