Skip to content

Instantly share code, notes, and snippets.

View Alphadelta14's full-sized avatar
⚔️
Load average: 233.0

Heather Lapointe Alphadelta14

⚔️
Load average: 233.0
View GitHub Profile
Hello world!
true
false
0
[]
[]
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
ok: [localhost]
TASK: [mylib | Test library out] **********************************************
<localhost> REMOTE_MODULE testlib something=else hello=world
ok: [localhost] => {"argv": ["/home/alpha/.ansible/tmp/ansible-tmp-1472124073.82-220477884547431/testlib", "/home/alpha/.ansible/tmp/ansible-tmp-1472124073.82-220477884547431/arguments"], "data": "something=else hello=world "}
@Alphadelta14
Alphadelta14 / input.js
Created September 10, 2015 03:08
Babel Transpiler
var myAnonymous = (b, c) => b*c;
function makeSummer(a, b=2, c=3){
return (a) => a+b+c;
}
function listPrinter(...d){
console.log(d);
}
@Alphadelta14
Alphadelta14 / setup.py
Created August 25, 2015 21:49
Working alternate install location
from setuptools.command.install import install
from setuptools import setup
class root_usr_install(install):
prefix = '/local'
def __init__(self, *args, **kwargs):
install.__init__(self, *args, **kwargs)
@Alphadelta14
Alphadelta14 / product.js
Created August 22, 2015 20:34
Node.JS Sugar Cartesian Product
require('sugar');
export.product = function(){
var pools = Array.create(arguments);
return pools.reduce(function(accumulated, next){
return accumulated.map(function(prefix){
return next.map(function(suffix){
return prefix.concat([suffix]);
In [4]: sorted([(p.personal.catchrate, p.natid) for p in pokemon])
Out[4]:
[(0, 0),
(3, 144),
(3, 145),
(3, 146),
(3, 150),
(3, 243),
(3, 244),
(3, 245),
// `mongo 127.0.0.1/MMApp collections.js`
function size(size) {
var unit, res, factor=1;
['B', 'KB', 'MB', 'GB', 'TB'].every(function(unit_) {
factor_ = factor*1024;
res = size/factor_;
unit = unit_;
if(isNaN(res) || res < 1) {
return false;