Skip to content

Instantly share code, notes, and snippets.

View codebrew's full-sized avatar

Code Brew Studios codebrew

View GitHub Profile
@codebrew
codebrew / olark.js
Created September 30, 2011 00:18
olark sample
// create a top level olark object
(function() {
var root = this;
var previousOlark = root.Olark;
var Olark = root.Olark = {};
// console isnt available on all browsers at all times, so stub it out
root.console || (root.console = {log : function() {} });
@codebrew
codebrew / gist:1290473
Created October 16, 2011 03:35
Turn an ec2 Ubuntu 10.04 instance into a StatsD/Graphite server
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@codebrew
codebrew / assets.js.erb
Created November 29, 2011 20:31
javascript asset helper
// helper to create proper asset paths if an asset host is configured
App.assets = {
assets : {
<% AssetsUtil.images.each do |img| %>
"<%= img %>" : "<%= asset_path(img) %>",
<% end %>
},
@codebrew
codebrew / hookio-server.conf
Created December 15, 2011 06:33
upstart script to run a master hookio-server
# Ubuntu upstart file at /etc/init/hookio-server.conf
author "Ryan Fitzgerald <[email protected]>"
env DIR=/var/lib/hookio-server/
env DAEMON=/usr/local/bin/hookio
env LOG_DIR=/var/log/hookio
env NODE_ENV=production
pre-start script