Skip to content

Instantly share code, notes, and snippets.

View jaredallard's full-sized avatar
🎯
Focusing

Jared Allard jaredallard

🎯
Focusing
View GitHub Profile
@jaredallard
jaredallard / express.js
Last active May 18, 2016 23:26
Dynamically Create Express Routes.
'use strict';
const express = require('express');
const async = require('async');
let ROUTES = path.join(__dirname, 'routes', API_VERSION);
fs.readdir(ROUTES, (err, list) => {
if(err) return next();
async.each(list, function(route, next) {
@jaredallard
jaredallard / install-ee2.sh
Last active May 3, 2016 23:15
EEII on Linux!
#!/usr/bin/env bash
# A minimal untested script to install
# Empire Earth II on Linux (note: it's just the wine ENV)
export WINEARCH=win32
export WINEPREFIX=~/.wineEEII
echo "installing wine and other libraries"
sudo pacman -S wine winetricks wine_gecko wine-mono lib32-mpg123 lib32-gstreamer lib32-gst-plugins-good lib32-gst-plugins-base
echo "using $(wine --version)"
@jaredallard
jaredallard / openpgp.txt
Created February 8, 2016 19:25
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:330cb625f1aef09e1de9a1bcfd942313d5b4ac9b]
@jaredallard
jaredallard / dankit.js
Last active February 3, 2016 06:36
Dank up Discord
// ==UserScript==
// @name Discord Dank-ified.
// @namespace https://discordapp.com/
// @version 1.3
// @description Make it dank memes
// @require http://code.jquery.com/jquery-latest.js
// @author Jared Allard <[email protected]>
// @match https://discordapp.com/channels/*
// @downloadURL https://gist.githack.com/jaredallard/06acc12e7a3d2f862ab7/raw/dankit.js
// @updateURL https://gist.githack.com/jaredallard/06acc12e7a3d2f862ab7/raw/dankit.js
@jaredallard
jaredallard / README.md
Last active December 18, 2015 23:07
Find the inverse of a penny pyramid from pen.js (total => stack)

unpen.js

Usage:

node index.js total

Notes

@jaredallard
jaredallard / README.md
Created December 18, 2015 20:25
Calculate a penny triangle using node.js!

pen.js

How to use:

node pen.js width height pennies_per_stack pennies_removed_per_row
D5AEF0F4E0FB082199B8CD3EE43589CA943F1D47A0D6DCA803543B22C7B17E46AABD12943857
@jaredallard
jaredallard / cext.lua
Created June 5, 2015 23:30
Almost done cext implementation
--[[
A lightweight ext-like FS implemented in pure lua.
Specs: <insert link here>
@author Jared Allard <[email protected]>
@license MIT
@notice uses JSDoc like insource documention.
]]
@jaredallard
jaredallard / cext.lua
Created May 31, 2015 05:22
ccDocker's cext fs implementation in the works!
--[[
A lightweight ext-like FS implemented in pure lua.
Specs: <insert link here>
@author Jared Allard <[email protected]>
@license MIT
@notice uses JSDoc like insource documention.
]]
@jaredallard
jaredallard / rootfs.ccdocker.fs
Created May 23, 2015 06:20
craftos; docker style!
{"inodes":{"":{"children":["root"],"isDir":true,"parents":[],"size":0},"root":{"children":["startup","programs","help","apis"],"isDir":true,"name":"root","parents":["/root"],"size":0},"root/apis":{"children":["colors","colours","disk","gps","help","io","keys","paintutils","parallel","peripheral","rednet","term","textutils","vector","window"],"isDir":true,"name":"apis","parents":["/root","/root/apis"],"size":0},"root/apis/colors":{"data":"LS0gQ29sb3JzCndoaXRlID0gMQpvcmFuZ2UgPSAyCm1hZ2VudGEgPSA0CmxpZ2h0Qmx1ZSA9IDgKeWVsbG93ID0gMTYKbGltZSA9IDMyCnBpbmsgPSA2NApncmF5ID0gMTI4CmxpZ2h0R3JheSA9IDI1NgpjeWFuID0gNTEyCnB1cnBsZSA9IDEwMjQKYmx1ZSA9IDIwNDgKYnJvd24gPSA0MDk2CmdyZWVuID0gODE5MgpyZWQgPSAxNjM4NApibGFjayA9IDMyNzY4CgpmdW5jdGlvbiBjb21iaW5lKCAuLi4gKQogICAgbG9jYWwgciA9IDAKICAgIGZvciBuLGMgaW4gaXBhaXJzKCB7IC4uLiB9ICkgZG8KICAgICAgICByID0gYml0LmJvcihyLGMpCiAgICBlbmQKICAgIHJldHVybiByCmVuZAoKZnVuY3Rpb24gc3VidHJhY3QoIGNvbG9ycywgLi4uICkKCWxvY2FsIHIgPSBjb2xvcnMKCWZvciBuLGMgaW4gaXBhaXJzKCB7IC4uLiB9ICkgZG8KCQlyID0gYml0LmJhbmQociwgYm