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": "ec784e5fbed0449b8de4f622d2646d5e",
"_rev": "2-cc0bf46655c4241f648e20430a516ffe",
"clone": {
"parent_id": "2e93f43c8b774b36b4b9cc848c94a553",
"parent_impl": "c2.logical.platform.Template"
},
"contents": {
"categories": [
"data"
<script>
Accounts.reset(<%= @accounts.to_json %>);
</script>
var Collection = Backbone.Collection.extend({
// Using the response from https://gist.github.com/1431041
url: '/gh/gist/response.json/1431041/',
initialize: function() {
// Assign the Deferred issued by fetch() as a property
this.deferred = this.fetch();
}
});
var View = Backbone.View.extend({
render: function() {
var _this = this;
// this.collection is passed in on instantiation
this.collection.deferred.done(function() {
var data = _this.collection.toJSON();
// Lets just output the response into the DOM
$('pre').html( JSON.stringify( data, '', ' ' ) );
});
}
[
{ "name": "abc" },
{ "name": "xyz" }
]
@wookiehangover
wookiehangover / gist:1328191
Created October 31, 2011 17:59
c2-frontend npm fresh install
sam@batman:~/dev/opdemand/c2-frontend^master ±
% npm ls -g 11-10-31 - 11:58:07
/Users/sam/Developer/lib
└─┬ npm@1.0.101
├── abbrev@1.0.3
├── graceful-fs@1.0.1
├── ini@1.0.1
├─┬ minimatch@0.0.4
│ └── lru-cache@1.0.4
├── node-uuid@1.2.0
<div class="environment"><header class="env-header"> <a href="#/platforms/master-environment" class="env-name"> <h2>Master Environment</h2> </a> <a href="#" class="ui-pen"></a> </header> <span clas="ui-arrow"></span> <ul class="platform-list"><li id="1eb2f7c738064bbd89223f53172d7e01" class="active"><header> <a href="#/platforms/ubuntu-oneric-vanilla" class="sys-name"> <h2>Ubuntu Oneric Vanilla</h2> <span class="ui-arrow"></span> </a> <a href="#" class="ui-lock"></a> <aside class="controls-status "> <h3 class="sys-status created_true"> <b>Status:</b>— </h3> <nav> <a href="#" class="ui-icon sys-start ttip" data-tip="Build &amp; Start" original-title="">Start</a> <a href="#" class="ui-icon sys-stop ttip" data-tip="Stop" original-title="">Stop</a> <a href="#" class="ui-icon sys-upgrade ttip" data-tip="Upgrade" original-title="">Upgrade</a> <a href="#" class="ui-icon sys-clone ttip" data-tip="Clone" original-title="">Clone</a>
@wookiehangover
wookiehangover / cakefile.coffee
Created November 5, 2011 06:47
c2 build script
fs = require 'fs'
{exec} = require 'child_process'
util = require 'util'
uglify = require 'uglify-js'
uglifycss = require 'uglifycss'
growl = require 'growl'
tmpl = require 'jquery-tmpl-jst'
findit = require 'findit'
@wookiehangover
wookiehangover / gitconfig
Created November 9, 2011 17:05
my .gitconfig
[user]
name = xxx
email = xxx
[apply]
whitespace = fix
[color]
ui = true ;doesnt work for some reason ...
@wookiehangover
wookiehangover / env.html
Created November 11, 2011 16:37
c2-frontend environment markup
<div class="environment active"><header class="env-header">
<a href="#/platforms/wookiehangover/master" class="env-name">
<h2>Master Environment</h2>
</a>
<a href="#" class="edit-icon"></a>
<form class="env-name-edit">
<input type="text" value="Master Environment">
<input type="submit" value="Save">
</form>
<aside class="controls-status">