Skip to content

Instantly share code, notes, and snippets.

Avatar

Myles Borins MylesBorins

View GitHub Profile
@MylesBorins
MylesBorins / gist:3961104
Created Oct 26, 2012
Install node on arm
View gist:3961104
First step...
sudo apt-get update && sudo apt-get upgrade
Go see a movie or write a novel
Follow instructions at https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
sudo apt-get install python-software-properties
Drink a beer while you wait
@MylesBorins
MylesBorins / avahi-daemon.conf
Created Nov 28, 2012
Default avahi-daemon.com
View avahi-daemon.conf
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
View meowcount.js
document.body.appendChild(document.createElement('script')).src='https://rawgit.com/tommoor/tinycon/master/tinycon.min.js';
document.body.appendChild(document.createElement('script')).src='//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.js';
// select the target node
var target = document.querySelector('#chat-list');
var count = 0;
// create an observer instance
var observer = new MutationObserver(function(mutations) {
var message = mutations[0].addedNodes[0].getElementsByTagName('p')[0].innerHTML
View example-path-reduce.js
var output = _.groupBy(examples, function (file) {
return file.split('/')[0];
});
output = _.reduce(output, function (result, folder, key) {
result[key] = _.groupBy(folder, function (file) {
return path.dirname(file);
});
return result;
}, {});
@MylesBorins
MylesBorins / test-example.js
Last active Mar 15, 2016
Tap setup / teardown example
View test-example.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
'use strict';
var test = require('tap').test;
var path = require('path');
var os = require('os');
var fs = require('fs');
View index.js
var stub = require('./stub');
stub.home().woops().maybe();
View 0001-Smell-Ya-Later-Anti-Feature.patch
From b716088dbc674ef205d68b90fd5b33266892974c Mon Sep 17 00:00:00 2001
From: Myles Borins <mborins@us.ibm.com>
Date: Sat, 28 Nov 2015 14:27:17 -0800
Subject: [PATCH] Smell Ya Later Anti-Feature
---
src/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/message.c b/src/message.c
View keybase.md

Keybase proof

I hereby claim:

  • I am thealphanerd on github.
  • I am thealphanerd (https://keybase.io/thealphanerd) on keybase.
  • I have a public key whose fingerprint is C4F0 DFFF 4E8C 1A82 3640 9D08 E73B C641 CC11 F4C8

To claim this, I am signing this object:

View test-regress-GH-123456.js
var http = require("https");
http.get("https://www.juvalis.de/", (res) => {
res.pipe(process.stdout);
});
View process-nextTick.js
var fs = require('fs');
function readSomething(path, cb) {
if (typeof path !== 'string') {
return process.nextTick(function () {
return cb('I should be second');
});
}
fs.readFile(path, cb);
}