Skip to content

Instantly share code, notes, and snippets.

hc2p / gist:bf93436bcb5ac58b88d6
Created Aug 6, 2014
extended Collection.prototype.fetch, added before:add:all and add:all event before and after 'add' events
View gist:bf93436bcb5ac58b88d6
orgFetch = Backbone.Collection::fetch
Backbone.Collection::fetch = (options={}) ->
success = options.success
options.success = (collection, resp, options) ->
collection.trigger 'before:add:all', collection, resp, options
collection.each (model) ->
model.trigger('add', model, collection, options)
collection.trigger 'add:all', collection, resp, options
success(collection, resp, options) if success
View gist:a611639da5e83e969cf9
var log = function(text) {
var el = document.createElement('p');
el.innerHTML = text;
var body = document.getElementsByTagName('body')[0];
hc2p / SassMeister-input-HTML.html
Created Apr 29, 2015
Generated by
View SassMeister-input-HTML.html
<div class="wrapper" >
View gist:a85571babcc1c5a3b704
$script = <<SCRIPT
echo I am provisioning...
apt-get install -yq git wget autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev alsa-utils
#also do
sudo echo "options snd-hda-intel model=3stack" >> /etc/modprobe.d/alsa-base.conf
git clone
cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemv
hc2p / gist:2185022
Created Mar 24, 2012 — forked from joefitzgerald/gist:1990736
Handlebars JST Grunt Task
View gist:2185022
* Grunt Task File
* ---------------
* Task: JST-HB
* Description: Compile handlebars templates to JST file.
* Dependencies: underscore@1.2.4
hc2p / gist:3714356
Created Sep 13, 2012 — forked from doginthehat/gist:1890659
compare block helper for handlebars
View gist:3714356
// {{compare unicorns ponies operator="<"}}
// I knew it, unicorns are just low-quality ponies!
// {{/compare}}
// (defaults to == if operator omitted)
// {{equal unicorns ponies }}
// That's amazing, unicorns are actually undercover ponies
// {{/equal}}
// (from
View beafy-vast.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?><VAST version="2.0" xmlns:xsi="" xsi:noNamespaceSchemaLocation="vast.xsd"><Ad id="1395013"><InLine><AdSystem>FT</AdSystem><AdTitle>Flashtalking vast template 2.0</AdTitle><Description>date of revision 19-12-13</Description><Survey></Survey><Error></Error><Impression id="ft_vast_i"><![CDATA[;1395013;201;gif;AmnetDE;CPMRoNPRVID10PreRoll101766800111000/?ft_creative=1131704&ft_configuration=0&cachebuster=1468929325]]></Impression><Impression id="3rdparty1"><![CDATA[]]></Impression><Impression id="3rdparty2"><![CDATA[;dc_trk_aid=295227103;dc_trk_cid=65211533;ord=1468929325]]></Impression><Impression id="3rdparty3"><![CDATA[]]></Impression><Impression id="3rdparty4"><![CDA
View gist:4745556
ctive moped count: 110721
Traceback (most recent call last):
File "./", line 14, in <module>
File "/Users/hannesprobst/.virtualenvs/moped/lib/python2.7/site-packages/django/core/management/", line 459, in execute_manager
File "/Users/hannesprobst/.virtualenvs/moped/lib/python2.7/site-packages/django/core/management/", line 382, in execute
File "/Users/hannesprobst/.virtualenvs/moped/lib/python2.7/site-packages/django/core/management/", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
View gist:5013564
this.client = new Dropbox.Client({
key: "<your secret key>",
sandbox: true,
token: dropboxProfile.oauth_token_key,
tokenSecret: dropboxProfile.oauth_token_secret
View gist:5013918
this.client = new Dropbox.Client({
key: "<your secret key>",
sandbox: true,
token: dropboxProfile.oauth_token_key,
tokenSecret: dropboxProfile.oauth_token_secret
You can’t perform that action at this time.