Skip to content

Instantly share code, notes, and snippets.

View carbocation's full-sized avatar

James Pirruccello carbocation

View GitHub Profile
@indraniel
indraniel / tar-gz-reader.go
Created February 23, 2015 19:05
Reading through a tar.gz file in Go / golang
package main
import (
"archive/tar"
"compress/gzip"
"flag"
"fmt"
"io"
"os"
)
@theophoric
theophoric / storage.go
Last active November 17, 2022 13:02
How to store + decode objects in golang using leveldb + gob
package main
import (
"bytes"
"encoding/gob"
"fmt"
"time"
"github.com/syndtr/goleveldb/leveldb"
)
@adharris
adharris / postgres_array.go
Created November 28, 2012 19:52
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@bemasher
bemasher / Subtitle.go
Created November 21, 2011 06:14
Subtitle decoder basic functionality written in Golang.
package main
import (
"io"
"os"
"fmt"
"log"
"bytes"
"image"
"image/png"