Skip to content

Instantly share code, notes, and snippets.

View jaredhoward's full-sized avatar

Jared Howard jaredhoward

  • Salt Lake City, Utah
View GitHub Profile
@jaredhoward
jaredhoward / go-github.pull-all.go
Created January 11, 2016 21:12
Go code for pulling all contents of a GitHub repository to the local file system. This is not a git clone, fetch, merge nor pull.
package main
import (
"crypto/sha1"
"encoding/hex"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
@jaredhoward
jaredhoward / jq-examples.md
Created October 23, 2015 22:21
jq Examples

jq Examples

jq is a lightweight and flexible command-line JSON processor.

The examples that I'm placing here are to help remind me how to do some parsing.

Flatten when the flatten function doesn't exist.

echo -e '["foo","bar"]\n["foo","fizz","buzz"]' | jq -c -s 'map(.[])'