Skip to content

Instantly share code, notes, and snippets.

View stevedev's full-sized avatar

Steve Thompson stevedev

View GitHub Profile
# Mock columns for tables
list
user_id integer
items:
user_id integer
list_id integer
users_items:
user_id integer
@stevedev
stevedev / fb-album.css
Created August 15, 2012 16:52
Simple jQuery Facebook Album Script
#photo-container {
padding: 15px;
}
#photo-container a {
overflow: hidden;
display: block;
float: left;
border: 1px solid #cdcac6;
padding: 0;
@stevedev
stevedev / gist:2996649
Created June 26, 2012 15:55
addCommas
Object.prototype.addCommas = ->
[left, right] = this.toString().split('.')
right = '.' + right if right?
right ?= ''
regex = /(\d+)(\d{3})/
left = left.replace(regex, '$1' + ',' + '$2') while (regex.test(left))
left + right

Run without bundle exec:

Update rvm and enable hook:

rvm get head && rvm reload
chmod +x $rvm_path/hooks/after_cd_bundler

Generate bin stubs:

@stevedev
stevedev / gist:1628824
Created January 17, 2012 20:57
Inspire Dev / Acceptance Policy for EMG

EMG Branching and Acceptance Strategy

Overview

Need to just refine our process a bit because it's becoming too much of a burden for acceptance testing. This might only be in place until product launch and then we can review and revise. All acceptance testing will be done on the staging server.

Problems this will solve

@stevedev
stevedev / gist:1497890
Created December 19, 2011 16:37
Inspire EM Gateway Development / Acceptance Procedure

Pre-development

Add a story to tracker

  • Story should just be a single task not an entire feature.
  • Add a description.
  • Attach a jpg for design, if needed.
  • Tag the story with the feature name for easy lookup
  • Do not add points. That belongs to the developer
  • Do not add tasks to the story. We use those for development. If you have a list of items or values, add them in the description.
@stevedev
stevedev / gist:1370683
Created November 16, 2011 17:08
Instal REE on OS X 10.7
rvm pkg install zlib
rvm pkg install openssl
rvm pkg install readline
export CC=/usr/bin/gcc-4.2
rvm install ree --force --with-readline-dir=$rvm_path/usr
@stevedev
stevedev / gist:1356621
Created November 10, 2011 23:30
mongo_mapper_helper... instead of using spec_helper in models
require 'mongo_mapper'
ENV["RAILS_ENV"] ||= 'test'
$LOAD_PATH.unshift ::File.dirname(__FILE__) + '/../'
MongoMapper.connection = Mongo::Connection.new("127.0.0.1", 27017, :pool_size => 5)
MongoMapper.database = 'testdb'
Dir['app/plugins/*.rb'].sort.each do |file|
@stevedev
stevedev / gist:1311251
Created October 25, 2011 03:55
cap deploy.rb
Capistrano::Configuration.instance(:must_exist).load do
set :rack_env, ARGV.first or "#{default_stage}"
set :shared_path, "/var/rails/#{fetch(:rack_env)}/#{fetch(:application)}"
set :deploy_to, "/var/rails/#{fetch(:rack_env)}/#{fetch(:application)}/src"
set :repository, "[email protected]:stevedev/emgateway.git"
default_run_options[:pty] = true
set :use_sudo, false
set :user, "root"
set :deploy_via, :export
@stevedev
stevedev / hack-1.md
Created September 12, 2011 17:58 — forked from timuruski/hack-1.md
Hack Night project

Basic Hack-Night Arbiter

  • User can start a hack-night with a list of emails
  • Emails are sent to users with URL to provide availability
  • Users can mark their availabilities per night for 2-week window
  • Once all availabilities are provided, a series of overlapping nights is presented

Advanced topics might include deciding on a topic, each hack could have a silly name to make it memorable after large amounts of drinking.

Requirements