Skip to content

Instantly share code, notes, and snippets.

wh1tney /
Created Aug 28, 2014
Rails Workflow - Getting Started

Rails Workflow

A few simple steps when starting a new Rails project

  • rails new <app_name>

  • Update Gemfile to include gems for testing

    • e.g. RSpec, FactoryGirl, Capybara
wh1tney / jshatesyou.js
Created Aug 20, 2014
JavaScript Hates You
View jshatesyou.js
var foo = new Object();
var bar = new Object();
var map = new Object();
map[foo] = "foo"; // --> map["[Object object]"] = "foo";
map[bar] = "bar"; // --> map["[Object object]"] = "bar";
// NOTE: second mapping REPLACES first mapping!
alert(map[foo]); // --> alert(map["[Object object]"]);
// and since map["[Object object]"] = "bar",
wh1tney / test_helper.rb
Created Aug 13, 2014
Rails Test Environment
View test_helper.rb
require "minitest/autorun"
require "mocha/setup"
require 'simplecov'
require 'capybara/dsl'
require 'capybara/rails'
module TestHelper
include Capybara::DSL
wh1tney /
Last active Jul 27, 2021
How to deploy a static website to Heroku


This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

wh1tney /
Last active Apr 17, 2018
Quick Introduction to the Ruby Twitter API


A brief introduction to the Ruby Twitter API, providing code and context.

Note: this tutorial is written using Github Flavored Markdown (GFM) for clarity (and usefulness). It was originally authored by @sylvaincarle and has been edited and updated by @wh1tney (7/26/2014).


  • Ruby is installed and functional
  • The twitter gem is ~ version 5.11.0