Skip to content

Instantly share code, notes, and snippets.

View wookiehangover's full-sized avatar
💭
just setting up my gthb...

Sam Breed wookiehangover

💭
just setting up my gthb...
View GitHub Profile
[
{
"_id": "1e77cfde831f4bda9dccb0b2cb1c750c",
"_rev": "2-d6e07398c8bcf97e8eba7f2f7de760ba",
"available": true,
"clouds": {},
"contents": {
"access_key": "xxx",
"owner_id": "xxx",
"secret_key": "xxx",
@wookiehangover
wookiehangover / build
Created November 17, 2011 06:07
node.js build script w/ redis & couch
#!/bin/sh -x
# C2 build script which runs as "root" on first boot
#
# NOTE: variables that start with a percent-sign will be substituted
# using /var/cache/c2/build-inputs.json.
#
# Use double-percent to escape percent signs.
# Update System
fs = require('fs')
{dirname} = require('path')
compilers = {}
compilers.js = compilers.css = (path) ->
fs.readFileSync path, 'utf8'
require.extensions['.css'] = (module, filename) ->
source = JSON.stringify(compilers.css(filename))
module._compile "module.exports = #{source}", filename
@wookiehangover
wookiehangover / catpile.coffee
Created November 25, 2011 07:20
compile a bunch of coffeez
fs = require 'fs'
{exec} = require 'child_process'
util = require 'util'
uglify = require 'uglify-js'
uglifycss = require 'uglifycss'
growl = require 'growl'
coffee_src_dir = 'app'
js_src_dir = 'public/js'
@wookiehangover
wookiehangover / app.js
Created November 28, 2011 05:42
strata file upload + static middleware === no worky
var strata = require("strata"),
path = require('path'),
multipart = strata.multipart;
var app = new strata.Builder;
app.use(strata.commonLogger);
app.use(strata.static, path.resolve('.'));
app.use(strata.contentType);
app.use(strata.contentLength);
[
{
"id": 1,
"foo": "bar",
"biz": "baz"
},
{
"id": 2,
"foo": "bar",
"biz": "baz"
$.when( myCollection1.deferred, myCollection2.deferred )
.then( successCallback, errorCallback );
@wookiehangover
wookiehangover / Cakefile
Created December 24, 2011 08:25
a pretty-good build script, with Cake
# Dependencies
fs = require('fs')
{_} = require('underscore')
path = require('path')
tmpl = require('handlebars-jst')
{log} = require('util')
growl = require('growl')
stitch = require('stitch')
uglify = require('uglify-js')
@wookiehangover
wookiehangover / gist:1731399
Created February 3, 2012 17:55
pip install pyzmq D:
sam@batman:~/dev
% pip install pyzmq :( 1 12-02-03 - 10:50:16
Downloading/unpacking pyzmq
Running setup.py egg_info for package pyzmq
Installing collected packages: pyzmq
Running setup.py install for pyzmq
******************************************
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: None
importTemplate: =>
if C2.user.credentials.length
@renderImportConfig()
# when creds are missing, create an error popup
else
content =
message: "Warning: Missing Credentials"
body: "AWS Credentials are required to import Templates"