Skip to content

Instantly share code, notes, and snippets.

11:54:58 ~/src/.../conde/cnt-feature-slideshow:spike-all-slides-styling ☹
↳ npm ls | grep handlebars
│ ├─┬ handlebars@1.0.12
├── handlebars-runtime@1.0.12
│ ├─┬ handlebars@1.0.12
│ ├─┬ handlebars@1.0.12
npm ERR! missing: Imager.js@git://github.com/joewillnyc/Imager.js#on-images-replaced-event, required by cnt-feature-slideshow@0.1.0
npm ERR! extraneous: imager.js@0.1.0 /Users/tkenned2/src/conde/cnt-feature-slideshow/node_modules/imager.js
npm ERR! not ok code 0
11:55:03 ~/src/.../conde/cnt-feature-slideshow:spike-all-slides-styling ☹
function vms(){
VMNAME=" "
if [[ -d .vagrant ]]; then
for MACHINE in `ls .vagrant/machines`; do
IDFILE=".vagrant/machines/$MACHINE/virtualbox/id";
if [ -f $IDFILE ]; then
ID=$(cat $IDFILE);
VMNAME=$(vboxmanage list runningvms| grep $ID | awk -F'["_]' '{print $2}');
fi
done
'use strict';
var http = require('http');
var url = require('url');
function rollDie(max){
return Math.floor(Math.random() * (max - 1 + 1)) + 1;
}
function startRollServer(port, ip){
function vms(){
if [[ -n $(which vboxmanage) ]]; then
VMNAME=" "
if [[ -d .vagrant ]]; then
for MACHINE in `ls .vagrant/machines`; do
IDFILE=".vagrant/machines/$MACHINE/virtualbox/id";
if [ -f $IDFILE ]; then
ID=$(cat $IDFILE);
VMNAME=$(vboxmanage list runningvms| grep $ID | awk -F'["_]' '{print $2}');
var http = require('http');
var express = require('express');
var socketio = require('socket.io');
var app = express();
var server = http.Server(app);
var io = socketio(server);

Keybase proof

I hereby claim:

  • I am toddself on github.
  • I am toddself (https://keybase.io/toddself) on keybase.
  • I have a public key whose fingerprint is 9044 EF82 D93F AFFF 02C2 7D5A 8510 4415 1D47 18C1

To claim this, I am signing this object:

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var _ = require('./underscore-min');
window._ = _;
},{"./underscore-min":2}],2:[function(require,module,exports){
// Underscore.js 1.7.0
// http://underscorejs.org
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n in
(function(){
var running = false;
var myfunction = function(){
if(running) return;
running = true;
doSomethingForAWhile(function(){
running = false;'
});
// OR
for(var i = 0; i < 100000000; i++){
@toddself
toddself / dumbqueue.js
Created November 17, 2014 14:33
dumb queue
var queue = [],
running = false;
function addToQueue(job){
queue.push(job);
processJob();
}
function processJob(){
var job;
var socketio = require('socket.io');
var express = require('express');
var http = require('http')
var app = express();
var server = http.Server(app);
var io = socketio(server);
app.listen(3000);