Skip to content

Instantly share code, notes, and snippets.

View rix501's full-sized avatar
🐒

Ricardo J. Vazquez rix501

🐒
  • NYC
View GitHub Profile
@rix501
rix501 / dynamic-logs.coffee
Last active December 16, 2015 23:21
Because we needed a birdlog and a jvstinlog
# 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
@rix501
rix501 / no-idea.coffee
Last active December 19, 2015 08:19
Hubot script for getting name-days for No Idea bar
# Description:
# Know name day in No Idea bar
#
# Dependencies:
# "cheerio": "0.12.0"
# "moment": "2.0.0"
#
# Configuration:
#
# Commands:
@rix501
rix501 / super-karma.coffee
Created July 29, 2013 14:12
Hubot plugin fro tracking arbitrary karma, with extra info
# Track arbitrary karma
#
# Description:
# Track arbitrary karma, with extra info
#
# Dependencies:
#
# Configuration:
#
# Commands:
@rix501
rix501 / gulpfile.coffee
Created January 31, 2014 20:56
Rough gulpfile
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')
#!/usr/bin/env coffee
fs = require('fs')
IMG_PATH = './www/img/'
IMG_REGEX = /(\/img\/[^ \t\r\n'"]*)/igm
images = []
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 )
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 )
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 )
// 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
@rix501
rix501 / machine.js
Last active August 25, 2020 15:41
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions