Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo '#!/bin/bash'
echo ''
echo 'failed_items=""'
echo 'function install_package() {'
echo 'echo EXECUTING: brew install $1 $2'
echo 'brew install $1 $2'
echo '[ $? -ne 0 ] && $failed_items="$failed_items $1" # package failed to install.'
echo '}'
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@webedia
webedia / example.js
Created December 18, 2013 22:31
Stampit modified to allow initialisation
var stampit = require('./stampit');
a = stampit().state({likes:['footy']}).init(function (firstname) {
this.firstname = firstname;
});
b = stampit().state({gender:'male'}).init(function (lastname) {
this.lastname = lastname;
});