Skip to content

Instantly share code, notes, and snippets.

View nii236's full-sized avatar

John Nguyen nii236

View GitHub Profile
function verify (hash, signature, Q) {
typeforce(types.tuple(
types.Hash256bit,
types.ECSignature,
types.ECPoint
), arguments)
var n = secp256k1.n
var G = secp256k1.G
@nii236
nii236 / useFilenameAsTitle.sh
Last active July 21, 2017 16:00
useFilenameAsTitle.sh
find . -print0 -type f -name '*.mp3' | xargs -0 -I {} mid3v2 -v -t `basename -s .mp3 {}` {}
# OR
for f in *.mp3; do basename -s .mp3 $f | xargs -0 -I {} mid3v2 -t "{}" "{}"; done
@nii236
nii236 / subcommands.go
Created February 22, 2017 09:14 — forked from poy/subcommands.go
Simple Subcommands in Go
package subcommands
import (
"fmt"
"log"
"os"
"strings"
)
type Command interface {
@nii236
nii236 / docker-compose.yaml
Created June 17, 2016 04:23
Example docker compose file
▶ cat docker-compose.yml
version: '2'
services:
nats:
image: nats:0.8.0
ports:
- "4222:4222"
- "8222:8222"
bitstampticksubscriber:
build:
@nii236
nii236 / 8upper.sh
Created February 26, 2016 09:35
This gist will take all of the PDFs in the current folder, and then output all of your 8up PDFs into the /out folder.
mkdir out && find . -type f -name \*.pdf -maxdepth 1 -exec pdfjam {} --nup 8x1 --papersize '{500px,100px}' --outfile out/{} \;

Keybase proof

I hereby claim:

  • I am nii236 on github.
  • I am nii236 (https://keybase.io/nii236) on keybase.
  • I have a public key ASBPbDJLKvYmzhgUwcBmnCoBmgT68z69-jSU94tZ4tO7Rwo

To claim this, I am signing this object: