Skip to content

Instantly share code, notes, and snippets.

View eliwjones's full-sized avatar
🩰

Mr. Eli W. Jones eliwjones

🩰
View GitHub Profile
@eliwjones
eliwjones / images.go
Last active June 7, 2018 15:57
Encoding permutations
package main
import (
"github.com/llgcode/draw2d/draw2dimg"
"image"
"image/color"
"math"
"math/rand"
"time"
)
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6JMR70S9ATuU0CbwAp1emWoQXaDfU8lsM8UO74NnkwjDT9ayBWv5YC90nweLRyFn+1B8IlLwpuTIqJs1Zl0szL6dt9PbiJISA7jDQNfMoNN6TLO/hHKH/oyjd2B8mP6YDxV3b/iI4FKUjRMxiA1+LlfQf7GbbSKQ3wEZPVVUenXiX8u5Gb1TSJsOvH2GL49cF3zqjGM7CtCJuXEPdM4BZw9yGtwXVmdmdpHk6R+vpGFHzb/ew4lezeqWKq6CU1hofirMGRlzayuddQqXmY/qGp0dDDSQeWaiXcXO78c0RskLc51o7gOoYaVAfKs21aeyfF/QWnJ5+SdViKGH+moUew== eli@happyfuncorp.com
@eliwjones
eliwjones / gossip_simulate
Last active January 3, 2016 09:59
Protean gossip protocol simulator.
package main
import (
"fmt"
"math"
"math/rand"
"runtime"
"sort"
"strconv"
"strings"
@eliwjones
eliwjones / fgit
Last active December 28, 2015 01:09
Future Git.
#!/bin/bash
# fgit 48 commit -a -m "I am 48 hours into the future! For amusement only."
# For daring madmen or sleazy conmen, try:
# git fetch && git rebase
function fgit() {
local NOWEPOCH=$(date +%s)
local INTO_FUTURE=$(($1*60*60))
shift
local COMMIT_DATE=$(($NOWEPOCH + $INTO_FUTURE))
@eliwjones
eliwjones / gist:1166973
Created August 24, 2011 00:11
mongodb Compound Index query wierdness.
mydb:PRIMARY> db.mycollection.find({propOne:869}).explain()
{
"cursor" : "BtreeCursor propOne_1_propTwo_1_propThree_1",
"nscanned" : 8889642,
"nscannedObjects" : 8889642,
"n" : 804382,
"millis" : 11683,
"nYields" : 152,
"nChunkSkips" : 0,
"isMultiKey" : true,