Skip to content

Instantly share code, notes, and snippets.

View AGhost-7's full-sized avatar
🤖
Discombobulating the hive mind

Jonathan Boudreau AGhost-7

🤖
Discombobulating the hive mind
  • The land of maple syrup
View GitHub Profile
@AGhost-7
AGhost-7 / install-vivofit2.bash
Last active May 8, 2016 21:47
Installing Vivofit on Ubuntu: Trusty Tahr WIP
# Install wine latest.
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine -y
# TODO: doesnt work????
# Install winetricks latest.
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo mv winetricks /usr/local/bin
@AGhost-7
AGhost-7 / 0-template-benchmark.js
Last active April 17, 2016 02:23
Bechmark for various templates
/* jshint esversion: 6 */
const Benchmark = require('benchmark');
const haml = require('hamljs');
const hogan = require('hogan.js');
const pug = require('pug');
const ejs = require('ejs');
const suite = new Benchmark.Suite();
▄▀▄▀▀▀▀▄▀▄░░░░░░░░░
░█░░░░░░░░▀▄░░░░░░▄░
█░░▀░░▀░░░░░▀▄▄░░█░█
█░▄░█▀░▄░░░░░░░▀▀░░█
█░░▀▀▀▀░░░░░░░░░░░░█
█░░░░░░░░░░░░░░░░░░█
█░░░░░░░░░░░░░░░░░░█
░█░░▄▄░░▄▄▄▄░░▄▄░░█░
░█░▄▀█░▄▀░░█░▄▀█░▄▀░
░░▀░░░▀░░░░░▀░░░▀░░░
@AGhost-7
AGhost-7 / botfinder.py
Last active March 30, 2016 00:22
Hmm would a bot or fake account created to bloat stars own a repo?
import requests
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--repo',
help='Repo name to query for the stargazers',
required=True)
parser.add_argument('--owner',
help='Organization name or user name that owns the repo',
@AGhost-7
AGhost-7 / 0-Preface.md
Last active March 28, 2016 21:46
Create Micro-Dsl
@AGhost-7
AGhost-7 / tuts.md
Created March 18, 2016 12:31
Compilation of tuts related to work

Fundamentals:

  1. JS:
  • npm install -g scope-chains-closures
  • npm install -g functional-javascript-workshop
  • npm install -g planetproto
  • npm install -g regex-adventure
  • npm install -g currying-workshopper
  1. Node:
  • npm install -g learnyounode
var amqp = require('amqp');
var con = amqp.createConnection({ host: 'localhost' });
console.log('created connection instance');
con.on('ready', function() {
console.log('ready');
con.queue('ping', function(q) {
console.log('listening to queue ping');
q.bind('#');
q.subscribe(function(message) {
console.log('arguments:', arguments);
@AGhost-7
AGhost-7 / redis-container-simple.docker
Created February 29, 2016 21:18
Simple redis container
FROM ubuntu:14.04
RUN \
apt-get update && \
apt-get install redis-server=2:2.8.4-2 && \
apt-get clean
CMD ["redis-server"]
@AGhost-7
AGhost-7 / qemu-install.bash
Created February 28, 2016 18:19
Basic install to get a VM with KVM kernel features
# Most tutorials tell you to install `qemu-kvm`, which I don't
# recomend. The KVM features were merged back into upstream
# QEMU a while ago, and I suspect that the `qemu-kvm` project
# has stagnated.
# Source: http://wiki.qemu.org/KVM
sudo apt-get install qemu -y
# Optional GUI
sudo apt-get install virt-manager -y
@AGhost-7
AGhost-7 / seneca-unit-testing.js
Last active February 20, 2016 13:44
Proper unit testing in Seneca?
// npm install seneca mocha
// npm run mocha .
var
seneca = require('seneca')(),
assert = require('assert');
// normally this would be a `module.exports = function`...
var myWorkflow = function() {
this.add({