This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Suppose we have some input data describing a graph of relationships between parents and children over multiple generations. The data is formatted as a list of (parent, child) pairs, where each individual is assigned a unique integer identifier. | |
// For example, in this diagram, 3 is a child of 1 and 2, and 5 is a child of 4: | |
// 1 2 4 | |
// \ / / \ | |
// 3 5 8 | |
// \ / \ \ | |
// 6 7 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const image1 = [ | |
[0,1,1,1,1,1], | |
[1,1,1,0,0,1], | |
[1,0,1,0,0,1], | |
[1,0,1,1,1,1], | |
[0,1,1,0,0,0], | |
] | |
// O( N * M ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const image1 = [ | |
[0,1,1,1,1,1], | |
[1,1,1,0,0,1], | |
[1,0,1,0,0,1], | |
[1,0,1,1,1,1], | |
[0,1,1,0,0,0], | |
] | |
// O( N * M ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const image1 = [ | |
[0,1,1,1,1,1], | |
[1,1,1,0,0,1], | |
[1,0,1,0,0,1], | |
[1,0,1,1,1,1], | |
[0,1,1,0,0,0], | |
] | |
// O( N * M ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee | |
fs = require('fs') | |
IMG_PATH = './www/img/' | |
IMG_REGEX = /(\/img\/[^ \t\r\n'"]*)/igm | |
images = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = require('http') | |
connect = require('connect') | |
lr = require('tiny-lr') | |
livereload = lr() | |
gulp = require('gulp') | |
using = require('gulp-using') | |
gutil = require('gulp-util') | |
compass = require('gulp-compass') | |
clean = require('gulp-clean') | |
notify = require('gulp-notify') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Track arbitrary karma | |
# | |
# Description: | |
# Track arbitrary karma, with extra info | |
# | |
# Dependencies: | |
# | |
# Configuration: | |
# | |
# Commands: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Know name day in No Idea bar | |
# | |
# Dependencies: | |
# "cheerio": "0.12.0" | |
# "moment": "2.0.0" | |
# | |
# Configuration: | |
# | |
# Commands: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Keep a variaty of logs | |
# | |
# Dependencies: | |
# | |
# Configuration: | |
# | |
# Commands: | |
# hubot logs - shows all logs stored | |
# hubot <name>log last <number> - show last number of logs |