Skip to content

Instantly share code, notes, and snippets.

John Bender johnbender

View GitHub Profile
View interview.java
// THE BAD
public class Lamp
{
private int bulbAge;
private String bulbType;
private int shadeAge;
public Lamp(int bulbAge, String bulbType, int shadeAge)
{
this.bulbAge = bulbAge;
View *.rb
def solve
is_solution = @board.partial_solution?(Board.from_hash(params[:solution]))
if is_solution
current_user.current_user_game_board.score!
else
current_user.current_user_game_board.missed_guess!
end
current_user.next_board!
View gist:344131
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. For a detailed explanation
# and listing of configuration options, please check the documentation
# online.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "base"
# Enable chef
config.vm.provisioner = :chef_solo
View mock.rb
before :all do
user = mock(Facebooker::User)
user.should_receive(:id).any_number_of_times.and_return(1)
friend = mock('friend')
friend.should_receive(:id).any_number_of_times.and_return(4800015)
user.should_receive(:friends).any_number_of_times.and_return([friend])
user.should_receive(:friends_with_this_app).any_number_of_times.and_return([friend])
You can’t perform that action at this time.