Skip to content

Instantly share code, notes, and snippets.

View rafrombrc's full-sized avatar

Rob Miller rafrombrc

  • Mozilla Corp
  • Oakland, CA
View GitHub Profile
@rafrombrc
rafrombrc / dice.go
Created July 2, 2014 22:12
throwing dice through a tcp socket
package main
import (
"flag"
"log"
"math/rand"
"net"
"strconv"
"strings"
)
@rafrombrc
rafrombrc / gist:9142016
Created February 21, 2014 19:47
When nil != nil, or lolgo
Code that's running:
outputError <- err
fmt.Println("t.connection (pre): ", t.connection)
if t.connection != nil {
fmt.Println("t.connection (post): ", t.connection)
fmt.Println("err: ", err)
t.connection.Close()
t.connection = nil