Skip to content

Instantly share code, notes, and snippets.

View schollz's full-sized avatar
🎺

Zack schollz

🎺
View GitHub Profile
@schollz
schollz / LICENSE.txt
Last active August 29, 2015 14:07 — forked from podefr/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Olivier Scherrer
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@schollz
schollz / bobp-python.md
Created November 8, 2015 04:14 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@schollz
schollz / public_key_encrypt_gpg_base64.go
Created March 11, 2016 03:42 — forked from jyap808/public_key_encrypt_gpg_base64.go
Public key encrypting a string into GPG format and outputting it in base64 encoding
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
)
@schollz
schollz / decrypt_gpg_armor_private_key.go
Created March 11, 2016 03:42 — forked from jyap808/decrypt_gpg_armor_private_key.go
Decrypting an ASCII armored GPG encrypted string using a private key (no passphrase) in ASCII armor format
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"fmt"
"io/ioutil"
"log"
)
@schollz
schollz / public_key_decrypt_gpg_base64.go
Created March 11, 2016 03:43 — forked from jyap808/public_key_decrypt_gpg_base64.go
Decrypting a base64 GPG public key encrypted string using a passphrase protected private key in ASCII armor format
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
)
@schollz
schollz / ssh-retry.sh
Created September 3, 2016 19:42 — forked from 9point6/ssh-retry.sh
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/usr/bin/env bash
# Check we've got command line arguments
if [ -z "$*" ] ; then
echo "Need to specify ssh options"
exit 1
fi
# Start trying and retrying
((count = 100))
@schollz
schollz / agent.nut
Created December 27, 2016 12:18 — forked from hfiennes/agent.nut
Electric Imp client for FIND
// electric imp client for FIND
// [email protected] 20161225
const FIND_GROUP = "group";
const FIND_USERNAME = "username";
const FIND_LOCATION = "someplace";
device.on("location", function(scan) {
server.log(http.jsonencode(scan));
@schollz
schollz / README.md
Created February 14, 2017 15:13 — forked from mattn/README.md
jsonstore vs bolt
c:\dev\go-sandbox\jsonstore>go test -bench . -count 10
goos: windows
goarch: amd64
BenchmarkJsonstore-4        2000            897051 ns/op
BenchmarkJsonstore-4        2000            885050 ns/op
BenchmarkJsonstore-4        2000           1131564 ns/op
BenchmarkJsonstore-4        2000            839048 ns/op
BenchmarkJsonstore-4        2000            919052 ns/op
BenchmarkJsonstore-4        2000            838547 ns/op
@schollz
schollz / README.md
Created February 14, 2017 15:13 — forked from mattn/README.md
jsonstore vs bolt
c:\dev\go-sandbox\jsonstore>go test -bench . -count 10
goos: windows
goarch: amd64
BenchmarkJsonstore-4        2000            897051 ns/op
BenchmarkJsonstore-4        2000            885050 ns/op
BenchmarkJsonstore-4        2000           1131564 ns/op
BenchmarkJsonstore-4        2000            839048 ns/op
BenchmarkJsonstore-4        2000            919052 ns/op
BenchmarkJsonstore-4        2000            838547 ns/op
@schollz
schollz / run.sh
Created October 16, 2017 12:39 — forked from miguelmota/config.sh
IPFS change port
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/9001
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001