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 -e | |
#$1 = the regex to identify the job; should use the pattern "[m]y job" | |
#$2 = the script to run | |
REGEX=$1 | |
SCRIPT=$2 | |
#try and get the PID | |
PSID=`ps -ef | grep "$REGEX" -m 01 | awk '{print $2}'` |
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
def with object | |
yield(object) | |
end | |
#so I can do this: | |
with Project.create do |project| | |
Task.create(:project_id => project.id) | |
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
Feature: Who cares? | |
Scenario: valid user accounts can log in | |
When I have a valid user account | |
Then I can login |
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
def reciprocal integer | |
1.0 / integer | |
end | |
describe 'reciprocal' do | |
it 'should return 1 over the integer' do | |
reciprocal(2).should == 0.5 | |
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
describe "a photo" do | |
it "should have a resource location" | |
it "should have EXIF data" | |
it "can include one or more people" | |
end | |
describe "a stack" do | |
it "should have at least one photo" | |
it "should have at least one bubbled photo" | |
it "can have zero or more sub stacks" |
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
describe "tagtastic" do | |
it "should recurse all the folders lazily" | |
describe "in preparation mode" do | |
it "should remove images" | |
it "should calculate the musicbrainz poid" | |
it "should store the poid as originalfilename.poid" | |
it "should look up the musicbrainz data for the poid and store it in originalfilename.json" | |
it "should log all files with no poid" | |
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
Dir["lib/*.rb"].each {|f| require File.join(File.dirname(__FILE__), "../", f)} |
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
draw = function() { | |
painter.clear(); | |
things.forEach(function(thing) { | |
if(thing.active) { | |
painter.draw(thing); | |
} | |
}); | |
}; |
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
define(["game/thing_view"], function(ThingView) { | |
return function(THREE, bullet) { | |
var _this = new ThingView(THREE, bullet, "/public/img/tank_bullet.png") | |
return _this; | |
} | |
}); |
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
unbind_all_the_things = (requirejs) -> | |
defined = requirejs.s.contexts._.defined | |
requirejs.undef(module) for module in Object.keys(defined) |
OlderNewer