Skip to content

Instantly share code, notes, and snippets.

Whitney wh1tney

Block or report user

Report or block wh1tney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wh1tney
wh1tney / flow.md
Created Aug 28, 2014
Rails Workflow - Getting Started
View flow.md

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
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
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'
SimpleCov.start
module TestHelper
include Capybara::DSL
@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active Aug 13, 2019
How to deploy a static website to Heroku
View deploy-static-site-heroku.md

Gist

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
wh1tney / ruby-twitter-api.md
Last active Apr 17, 2018
Quick Introduction to the Ruby Twitter API
View ruby-twitter-api.md

Gist

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).

Assumptions

  • Ruby is installed and functional
  • The twitter gem is ~ version 5.11.0
You can’t perform that action at this time.