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
// Here is an extremely simple version of work scheduling for multiple | |
// processors. | |
// | |
// The Problem: | |
// We have a lot of numbers that need to be math'ed. Doing this on one | |
// CPU core is slow. We have 4 CPU cores. We would thus like to use those | |
// cores to do math, because it will be a little less slow (ideally | |
// 4 times faster actually). | |
// | |
// The Solution: |
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 node | |
function BK() { | |
var self = this; | |
this.bkList = []; | |
this.seenConditionBefore = function(n) { | |
if (self.bkList[self.calculateConditionIndex(n)]) | |
return true; | |
else |
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
var kegsandbottles = (function () { | |
var temp; | |
var output = ''; | |
var counter = 0; | |
var numbers = [5, 7]; | |
var exports = function () { | |
exports.start(); | |
}; | |
var templates = { |
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
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
# look good | |
# set -g default-terminal "xterm-256color" | |
set-option -g default-command "reattach-to-user-namespace -l bash" |
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
var ping = require('jjg-ping'); | |
function pingGoogle () { | |
var connected, disconnected, c, d = 0; | |
var spikelength, spikedistance = []; | |
this.run = function() { | |
ping.system.ping('google.com', function(latency, status) { | |
if (status) { |