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' | |
module Hardline | |
def self.extended(base) | |
base.define_singleton_method(:construct_with) do |*args| | |
base.define_singleton_method(:new) do |*init_args| | |
combined_args = args.zip(init_args) | |
me = self.allocate | |
me.tap do |obj| | |
combined_args.map do |(n, v)| |
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
# Default Theme | |
if patched_font_in_use; then | |
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="⮂" | |
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="⮃" | |
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="⮀" | |
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="⮁" | |
else | |
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀" | |
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮" |
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 AddNameToComments < ActiveRecord::Migration | |
def change | |
add_column :comments, :name, :string # add a string column called name to the table comments | |
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
import time | |
import copy | |
from itertools import * | |
class Cell(object): | |
alive = False | |
def __str__(self): | |
return 'o' if self.alive else '.' |
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
#!/usr/bin/env bash | |
set -e | |
EXPECTED_ARGS=2 | |
main(){ | |
check_arguments $* | |
return_to=$PWD |
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
Ethan | |
Firstly, a lot of the developers in the local Ruby community have been the target of your spam lately. Suffice to say that it is unwelcome and has not been well received. I notice that you've taken it upon yourself to start advertising our job for us. We no longer use recruiters to fill our development job vacancies and even if we did, we certainly would not be using testdrivenit based on what we have seen of your approach. | |
Please stop pretending that you represent us. We have not asked you to work on any vacancies for On the Beach and we do not want our reputation dragged through the mud with our local Ruby community. | |
As for your applicant, we are not interested in considering any of your candidates. The best thing you can do for them is tell them to get in touch directly if they are interested in working for On the Beach. | |
Regards, |
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 TestMigration < ActiveRecord::Migration | |
def self.up | |
create_table :test_models do |t| | |
t.integer :created_at | |
end | |
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
Application = {} | |
jQuery(function($) { | |
for( key in Application) { | |
if( Application.hasOwnProperty(key)) { | |
if (typeof Application[key]["init"] === "function" && $('body').hasClass('with-js-' + key.toLowerCase())){ | |
Application[key].init($) | |
} | |
}; | |
}; | |
} |
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
# House Model | |
class House | |
has_many: occupants | |
# ... Other House related methods live here ... | |
end | |
# Presenter for a House object | |
# Deals with visual shenanigans for the view | |
class HouseDecorator |
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
diff <(find . -type f | sed -e 's/\.\///' | sort| grep -v '.git') \ | |
<(git ls-files | grep -v '.git' | sort) |