Skip to content

Instantly share code, notes, and snippets.

Andrew Chilton chilts

View GitHub Profile
@chilts
chilts / gist:687ec1e8c5337213a7e1a5de2d3584ae
Last active Mar 28, 2019
Dump a BoltDB (zipped) to a Dir with a Timestamp
View gist:687ec1e8c5337213a7e1a5de2d3584ae
package main
// From : https://gist.github.com/chilts/687ec1e8c5337213a7e1a5de2d3584ae
import (
"compress/gzip"
"fmt"
"log"
"os"
"path"
@chilts
chilts / handlers.go
Last active Mar 8, 2017
Simple, re-usable handlers for standard tasks.
View handlers.go
package main
// https://gist.github.com/chilts/db1adfaddaae871b161d7eadab6b1278
import (
"bytes"
"html/template"
"log"
"net/http"
)
@chilts
chilts / ReadMe.md
Last active Oct 18, 2016
"How Dropbox securely stores your passwords" in terrible, insecure, horrible GoLang (GoLang is not terrible, my code is).
View ReadMe.md
@chilts
chilts / dump.go
Created Sep 15, 2016
Dump entire BoltDB to stdout, including Nested Buckets
View dump.go
package main
import (
"fmt"
"log"
"strings"
"time"
"github.com/boltdb/bolt"
)
View out.txt
chilts@ant:~/go/src$ time env GO_TEST_TIMEOUT_SCALE=10 GOROOT_BOOTSTRAP=$HOME/go-linux-arm-bootstrap ./all.bash
##### Building Go bootstrap tool.
cmd/dist
##### Building Go toolchain using /home/chilts/go-linux-arm-bootstrap.
bootstrap/internal/obj
bootstrap/asm/internal/flags
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/internal/obj/arm
@chilts
chilts / json-verify
Last active Sep 2, 2015
My Release Procedures
View json-verify
#!/usr/bin/env node
// core
var fs = require('fs');
try {
var json = fs.readFileSync(process.argv[2]).toString('utf8');
} catch (e) {
console.log('json-verify: ' + e);
process.exit(2);
View output.txt
$ node client.js
--- signUp ---
{
"uid": "8bc2add5218d4f10971a139a54ad6a4f",
"sessionToken": "00b4e46c5e94fdec7726ea1bc145363ba8174c8794d470134b6bf1f1364ce5d6",
"authAt": 1427337145
}
prompt: code: fdfe175d9f20fa0d3e1d8e7a61dfa481
--- verifyCode ---
{}
View housekeeping.txt
Each repo:
* README.md
* package.json
* description
* repository
* author
* license
* homepage
* bugs
View message.txt
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.11 (GNU/Linux)
hQEMA1m/rf1rAzwlAQf+IYlOAq4XOQy2dl8BkBWv3/Pa8kB0r2vpOf2eOZ7pzVK8
qWWTOPRetBFqmfsJJlx5q4Y2VA/FOazZZCYi2/2hB/tLRBziLN3t88hpgbYKjuOr
neir4jBbCkfQ8fqCa7gO+x3juQvjhVILLecIPsbNf/hzsiRCIajvI1YirncrkfIT
5z+ZDcntKsCOTgN76HHN0mG9XnvKLGEqQUp1klVb9HarsEd1VMtk5v/YO3Y+9qqh
zQWt3LdieyPDBuhHud0nH9AVOvS71+jf7htKghYB1Tq40VYJVZsc47i8FqAvTuVL
RazWermyYm1LjMsTWzWrkSGOfYfiPNxxVWt+v4BMe9J4AUIDuajXVn0KPWfxp1go
FT6OwliVCktx2qFO+3GpvpnTHUcjP0uQa/nVx1SUHXfLwWLV415dt61RL1RYzA59
@chilts
chilts / keybase.md
Created Mar 26, 2014
Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am chilts on github.
  • I am chilts (https://keybase.io/chilts) on keybase.
  • I have a public key whose fingerprint is 233F 80A4 462A B14B AB46 9504 B382 E549 5685 997E

To claim this, I am signing this object:

You can’t perform that action at this time.