Skip to content

Instantly share code, notes, and snippets.

View ascendantlogic's full-sized avatar

Matthew Case ascendantlogic

  • Ascendant Logic, LLC
  • Cleveland, OH
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ascendantlogic on github.
  • I am ascendantlogic (https://keybase.io/ascendantlogic) on keybase.
  • I have a public key ASACjXy_poC5lPJeDQfoV_0DEokCZjzWxnyrmAOaZyVcWAo

To claim this, I am signing this object:

access_key = ""
secret_key = ""
@ascendantlogic
ascendantlogic / ansible_run_failure
Created September 23, 2014 14:47
Ansible run failure
failed: [104.130.210.174] => (item=openjdk-7-jre,elasticsearch) => {"failed": true, "item": "openjdk-7-jre,elasticsearch"}
stderr: Failed to fetch http://mirror.rackspace.com/ubuntu/pool/main/n/nspr/libnspr4_4.10.7-0ubuntu0.12.04.1_amd64.deb 404 Not Found
Failed to fetch http://mirror.rackspace.com/ubuntu/pool/main/n/nss/libnss3_3.17-0ubuntu0.12.04.1_amd64.deb 404 Not Found
Failed to fetch http://mirror.rackspace.com/ubuntu/pool/main/n/nss/libnss3-1d_3.17-0ubuntu0.12.04.1_amd64.deb 404 Not Found
Failed to fetch http://mirror.rackspace.com/ubuntu/pool/main/d/dbus/dbus-x11_1.4.18-1ubuntu1.6_amd64.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
stdout: Reading package lists...
Building dependency tree...
Reading state information...

Keybase proof

I hereby claim:

  • I am ascendantlogic on github.
  • I am ascendantlogic (https://keybase.io/ascendantlogic) on keybase.
  • I have a public key whose fingerprint is EF64 25F2 49A2 D4A8 939A BF35 E24F F20B 0100 39F4

To claim this, I am signing this object:

@ascendantlogic
ascendantlogic / load_balancer.js
Created January 5, 2013 03:03
Just some random node.js load balancing code I wrote about a month ago. It forks child processes for each core on the machine you're on and puts the PIDs into a workers/ directory so you can restart children with commands like "ls workers/* | xargs kill". Not guaranteed to be useful or even work right at this point, just something I spent an eve…
var http = require('http')
, path = require('path')
, os = require('os')
, fs = require('fs')
, cluster = require('cluster');
var app, logger;
var numCores = os.cpus().length;
var workerPidPath = path.join(__dirname, 'workers/');
var masterPidPath = path.join(__dirname, 'master/');