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 | |
/usr/local/bin/phantomjs_original $@ 2> >(grep -v userSpaceScaleFactor 1>&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
class Atom | |
attr_reader :symbol | |
def initialize(symbol) | |
@symbol = symbol | |
end | |
def ==(other) | |
self.symbol == other.symbol | |
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: Enrolment | |
Scenario: Enrolling in a course | |
Given there is a course | |
And I am logged in as a learner | |
When I enrol on a course | |
Then the course should appear in 'my courses' |
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 'Enrolment' do | |
scenario 'Enrolling in a course' do | |
course = FactoryGirl.create(:course) | |
learner = FactoryGirl.create(:learner) | |
login_as learner | |
visit course_path(course) | |
find('.join').click | |
expect(page).to have_content('Thanks for joining!') |
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 'Enrolment' do | |
scenario 'Enrolling in a course' do | |
given_there_is_a_course | |
and_i_am_logged_in_as_a_learner | |
when_i_enrol_on_a_course | |
then_the_course_should_appear_in_my_courses | |
end | |
def given_there_is_a_course | |
@course = FactoryGirl.create(:course) |
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 | |
jekyll build | |
s3cmd sync -r --acl-public public/ s3://chriszetter.com/ |
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
There was a programmer from Skegness, | |
Who had a language that was a bit of a mess, | |
They implemented subtyping, and no longer was there griping, | |
All while keeping safety, preservation and progress |
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 wait_for_pending_requests | |
start = Time.now | |
while pending_requests? | |
if (Time.now - start) > 60 | |
raise "Requests did not finish in 60 seconds" | |
else | |
sleep(0.01) | |
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
word_1 | word_2 | word_1_language | word_2_language | |
---|---|---|---|---|
ramer | remar | French | Castilian | |
afaka | akafa | French | Castilian | |
NATO | OTAN | English | French | |
nier | rein | Afrikaans | French | |
NATO | OTAN | German | French | |
NATO | OTAN | Italian | French | |
erum | mure | Ainu (Latin) | Interlingua | |
NATO | OTAN | English | Castilian | |
agua | auga | Castilian | Mirandese |
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 'json' | |
require 'csv' | |
class Line | |
attr_reader :thread_no, :line_no, :path, :klass, :method_id, :event, :code, :line | |
def initialize(row) | |
@thread_no, @line_no, @path, @klass, @method_id, @event, @code = row | |
end |