Skip to content

Instantly share code, notes, and snippets.

View ryan-roemer's full-sized avatar

Ryan Roemer ryan-roemer

View GitHub Profile
@ryan-roemer
ryan-roemer / .gitignore
Last active August 29, 2015 13:58
Backbone.js Training - Day 3 - AMD / Frontend Testing
.DS_Store
@ryan-roemer
ryan-roemer / app.js
Created April 2, 2014 01:41
Backbone.js Training - Day 2 - Customer Child/Parent Views
/**
* Application.
*
* This file is usually the "binding" of all of the individual Backbone.js
* components into a unified whole. It is also typically *not* unit tested
* because it has side effects from just running it. So, here is the expected
* place to also do things like start Backbone.js History, do `$()` DOM
* manipulation, etc.
*/
define([
{ "name": "Ryan" }
@ryan-roemer
ryan-roemer / prepare-commit-msg
Created December 31, 2012 19:57
Extract Pivotal Tracker story ID from git branch name and append to git commit messages.
#!/bin/sh
# Pivotal Tracker Ticket Extraction
# =================================
# Extract Pivotal Tracker ticket ID from branch name and prepend to commit
# message for GitHub hook.
#
# Takes a commit message like: "A commit comment" for branch "bug-1234-hello"
# and changes it to: "A commit comment [#1234]" for easier commit ticket
# updates.
@ryan-roemer
ryan-roemer / server-cluster.coffee
Created September 6, 2012 13:56
Node.js v0.8 Cluster Server
cluster = require "cluster"
log = require "winston"
config = require "config" # Your configuration goes here.
app = require "./server" # Your real server goes here.
numCpus = require("os").cpus().length
workers = {}
# Helpers.
shutdown = ->
@ryan-roemer
ryan-roemer / gist:2399041
Created April 16, 2012 14:06
Chef Attribute Array Stack Trace
Generated at Mon Apr 16 13:44:28 +0000 2012
NoMethodError: undefined method `+@' for ["0.6.15"]:Array
/var/cache/chef/cookbooks/nodejs/attributes/default.rb:20:in `from_file'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:655:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:653:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:653:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:652:in `each'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/node.rb:652:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:101:in `load_attributes'
/usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/../lib/chef/run_context.rb:60:in `load'
@ryan-roemer
ryan-roemer / app.yaml
Created January 6, 2012 13:39 — forked from darktable/app.yaml
App.yaml designed for serving an authenticated, static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May n
# App configuration for static site with auth.
#
# Originally from: https://gist.github.com/873098
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
@ryan-roemer
ryan-roemer / gist:1189432
Created September 2, 2011 18:35 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Senior Engineer, IP Street
Favorite Python project: django/django-nonrel
Favorite Conference: PyCon
Python Experience Level: Advanced