Skip to content

Instantly share code, notes, and snippets.

View matomesc's full-sized avatar

Mihai Tomescu matomesc

View GitHub Profile
@matomesc
matomesc / vending.js
Created February 9, 2012 19:16
Vending machine DFA transitions
// usage: node vending.js > transitions
var coins = [5, 10, 25, 100];
var _sum = 125;
var validTransitions = [];
coins.forEach(function (c) { check(0, c); })
function check(sum, coin, transitions) {
transitions = transitions || [];
var newSum = sum + coin;
@matomesc
matomesc / redis.markdown
Created January 12, 2012 00:58 — forked from bdotdub/redis.markdown
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install: