Skip to content

Instantly share code, notes, and snippets.

marksim /
Created March 3, 2016 17:06

Keybase proof

I hereby claim:

  • I am marksim on github.
  • I am marksim ( on keybase.
  • I have a public key whose fingerprint is 351B AEFF 19E6 F01A 283F E0E6 FB4A 9F3A 2F2C B718

To claim this, I am signing this object:

View employment_spec.rb
require 'rspec'
require 'date'
class EmploymentEvent <, :status)
def <=> (b)
date <=>
def as_start
date + 1

Github Questions


Knowing what you know about GitHub, how would you design the high level infrastructure for What sequence of steps would happen when loading in a browser? Don't worry about describing the specific libraries and services that handle each step.



Well, let's start with a few assumptions so we're on the same page:

View server_name_spec.rb
require 'rspec'
def next_server_number(server_numbers)
server_numbers.sort.each.with_index do |s, i|
return i+1 if s > i+1
return server_numbers.count + 1
describe 'next_server_number' do
View release_notes
version = ARGV.first
if version
releases = `heroku releases -n 50 --remote=production | grep Deploy | grep -A1 #{ARGV.first}`
commits = releases.split("\n") {|r| r.split(/\s/)[3] }.join('..')
command = 'git log --pretty=format:"%h - %an, %ar : %s" ' + commits
puts `#{command}`
puts "A version is required: ex: release_notes v191"
View new_computer_setup
xcode-select --install
# homebrew / cask / util
ruby -e "$(curl -fsSL"
brew doctor
brew tap phinze/homebrew-cask
brew install brew-cask
brew cask install alfred
brew cask install iterm2
marksim / .powenv
Last active January 4, 2016 17:39
Pow Config
View .powenv
# Automatically exports all variables in .env files
export $(cat .env)
View game_of_life.rb
require 'rspec'
class GameOfLife
def initialize(generation)
@generation = generation
attr_reader :generation
def is_alive?(x, y)
View tictactoe_spec.rb
require 'rspec'
class TicTacToe
attr_reader :current_player
def initialize
@current_player = 'O'
@plays = {'O' => [], 'X' => []}
def play(x,y)
View tic_tac_toe_spec.rb
require 'rspec'
require 'set'
class TicTacToe
attr_reader :current_player
def initialize
@current_player = 'O'
@plays = {
'O' => [],