Skip to content

Instantly share code, notes, and snippets.

@robinhowlett
robinhowlett / Backbone-HAL.js.coffee
Created June 29, 2012 22:46 — forked from mikekelly/Backbone-HAL.js.coffee
Two small components for making Backbone play nicely with application/hal+json
window.HAL = {}
class HAL.Model extends Backbone.Model
constructor: (attrs) ->
super @parse(_.clone attrs)
parse: (attrs = {}) ->
@links = attrs._links || {}
delete attrs._links
@embedded = attrs._embedded || {}
@robinhowlett
robinhowlett / update_repos.sh
Created April 18, 2012 23:37
"git pull origin master" all sub-directories in a directory
for i in $(ls -l . | awk '/^d/ {print $NF}'); do
cd $i;
echo "------------------------------------------------";
pwd;
echo "------------------------------------------------";
git pull origin master;
cd ..;
done