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
# This removes obvious references to the author from a given git repo. | |
# This isn't foolproof - you'll have to trust that interviewers won't go digging. | |
# re-write the branch so that the author email, name, and committer are replaced with the candidate’s reference. | |
# if there are any branches other than master, you'll need to run that command on those separately. | |
git filter-branch -f --prune-empty --env-filter 'GIT_AUTHOR_EMAIL=redacted@example.com; GIT_AUTHOR_NAME="XX"; GIT_COMMITTER_NAME="XX"; export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME GIT_COMMITTER_NAME' | |
# remove any remotes - check what they are called and replace `origin` if necessary | |
git remote rm origin |
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
I currently earn £49,776 (GBP) each year as Head of Development for a charity, working a 4-day week, in central London. |
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
CREATE TABLE people ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
name VARCHAR(20), | |
age INT(10) | |
); | |
CREATE TABLE dogs ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
person_id INT(10), | |
name VARCHAR(20) | |
); |
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 'spec_helper' | |
# https://github.com/raganwald-deprecated/homoiconic/blob/master/2009-02-02/hopeless_egocentricity.md | |
class HopelesslyEgocentric < BasicObject | |
def method_missing(*args, &block) | |
self | |
end | |
# These methods are required to make the tests output their failures normally. | |
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
source 'https://rubygems.org' | |
gem 'totally_cool_art', git: "https://github.com/shjohnson/TotallyCoolArt" | |
gem 'sinatra' | |
group :test, :development do | |
gem 'rspec' | |
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
Basic select: | |
SELECT * FROM users; | |
Selecting only some columns: | |
SELECT id, name FROM users; | |
Aliasing columns: |
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
moon_id=0x1F311 | |
loop do | |
8.times do |i| | |
delete = ("\b"*6) | |
moon = [moon_id+i].pack("U") | |
spaces = (" "*5) | |
line = delete + moon + spaces | |
print(line) | |
sleep(0.1) | |
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
# Modules can be used for namespacing... | |
module Whizz | |
class SoundEffect | |
def noise | |
"Whizzo!" | |
end | |
end | |
class Popper |
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
# I'm less sorry but still a bit sorry. | |
class Adventure | |
def rooms | |
{ | |
room_one: "You are in a maze of twisty little passages, all alike", | |
room_two: "It is dark here. You are likely to be eaten by a grue.", | |
room_three: "It is dark here." | |
} |
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
# I'm so, so sorry. | |
class Adventure | |
def run | |
@location = :north | |
puts "You are in a maze of twisty little passages, all alike" | |
puts "What do you do?" | |
result = gets.chomp |
NewerOlder