Skip to content

Instantly share code, notes, and snippets.

View chrisabrams's full-sized avatar

Chris Abrams chrisabrams

  • New York, NY
View GitHub Profile
@chrisabrams
chrisabrams / anchor.js
Created January 9, 2012 18:52 — forked from draeton/anchor.js
Anchor - A URL parsing utility
/**
* Anchor - A URL parsing utility
*
* Copyright 2012, Matthew Cobbs
* MIT licensed
*
* Methods:
*
* getSearchVars - returns a key-value object with the parameters in the URL search
* setSearchVars(o) - sets parameters using a key-value object in the URL search
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
@chrisabrams
chrisabrams / build.sh
Created February 20, 2012 20:04 — forked from badsyntax/build.sh
An example PHP & BASH Post-Receive github web hook to package projects
#! /usr/bin/env bash
#clone the repo
git clone -q "${1}" "clones/${2}"
cd "clones/${2}"
#update the submodules (how do we handle errors here?)
git submodule --quiet update --init --recursive
<VirtualHost 1.2.3.4:80>
ServerAdmin me@example.com
ServerName example.com
DocumentRoot /srv/www/example.com/public/
ErrorLog /srv/www/example.com/logs/error.log
CustomLog /srv/www/example.com/logs/access.log combined
ProxyPass / http://127.0.0.1:8100/
ProxyPassReverse / http://127.0.0.1:8100/
<Proxy *>
@chrisabrams
chrisabrams / rabbitmq-install-osx.md
Created May 1, 2012 17:32 — forked from jch/rabbitmq-install-osx.md
Troubleshooting RabbitMQ installation on OSX via homebrew

Troubleshooting RabbitMQ installation on OSX via homebrew

brew update
brew install rabbitmq

To see if rabbitmq is running after following the installation instructions:

launchctl list | grep rabbit
> 48303	-	homebrew.mxcl.rabbitmq
@chrisabrams
chrisabrams / micro-mustache.js
Created June 28, 2012 05:36 — forked from topliceanu/micro-mustache.js
John Resig's Micro Template with changed tags from <%=, %> into more mustache-esque {{= and }}
// Simple JavaScript Templating
// John Resig - http://ejohn.org/ - MIT Licensed
(function(){
var cache = {};
this.tmpl = function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?
cache[str] = cache[str] ||
{
"name": "nakama",
"subdomain": "nakama",
"description": "photo sharing",
"scripts": {
"start": "node server.js"
},
"version": "0.0.1-5",
"engines": {
"node": "v0.8.x"
{
"name": "nakama",
"subdomain": "nakama",
"description": "photo sharing",
"scripts": {
"start": "node server.js"
},
"version": "0.0.1-6",
"engines": {
"node": "v0.8.x"
{
"name": "nakama",
"subdomain": "nakama",
"description": "photo sharing",
"scripts": {
"start": "node server.js"
},
"version": "0.0.1-12",
"engines": {
"node": "v0.8.x"
@chrisabrams
chrisabrams / output
Created November 11, 2012 21:31
Cannot deploy to Nodejitsu
jahopc:naka.ma abrams$ jitsu deploy
info: Welcome to Nodejitsu chrisabrams
info: jitsu v0.11.3, node v0.8.1
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node server.js
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write /Users/abrams/Web/naka.ma/package.json
data: