Skip to content

Instantly share code, notes, and snippets.

@bajtos
bajtos / notice.md
Last active August 29, 2015 14:06
LoopBack workshop
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@tlrobinson
tlrobinson / post-receive
Last active December 7, 2022 08:15
Super simple git post-receive hook for Node.js + nvm + npm + node-foreman + init (Ubuntu) deployment
#!/usr/bin/env bash
set -u
set -e
export GIT_WORK_TREE="/var/www/example.com"
export NODE_VERSION="0.10"
echo "--> Checking out..."
git checkout -f
@jgeurts
jgeurts / statsd-graphite-install.sh
Last active January 28, 2017 20:23
Install statsd and graphite as a services on Ubuntu 13.10
sudo apt-get install --assume-yes python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --assume-yes nodejs
sudo apt-get install --assume-yes git
# Install Graphite
sudo apt-get install python-dev ruby-dev bundler build-essential libpcre3-dev graphite-carbon graphite-web
cat >> /tmp/graphite-carbon << EOF
# Change to true, to enable carbon-cache on boot
@max-mapper
max-mapper / readme.md
Created August 19, 2012 05:18
put-a-closure-on-it

Put a closure on it

Sometimes you'll have objects that manage state along with event handling. This happens frequently in MVC apps. Let's start with a messy example:

var Launcher = function(rocket) {
  this.rocket = rocket
}

Launcher.prototype.isReady = function() {