Skip to content

Instantly share code, notes, and snippets.

View refs's full-sized avatar
🤖
Another pointless day where I accomplish nothing 🍸

Alex Unger refs

🤖
Another pointless day where I accomplish nothing 🍸
View GitHub Profile

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@refs
refs / logger_middleware.go
Created November 4, 2020 12:03 — forked from blixt/logger_middleware.go
Logger middleware for Go HTTP servers which logs every request with response status code in the Apache format.
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
"time"
)
@refs
refs / tmux-cheatsheet.markdown
Created February 12, 2020 15:45 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@refs
refs / gist:77aace5f89c0ad7e17aff0858c0b3aa7
Created December 23, 2019 13:55 — forked from fiorix/gist:9664255
Go multicast example
package main
import (
"encoding/hex"
"log"
"net"
"time"
)
const (
@refs
refs / go-stdlib-interface-selected.md
Created July 18, 2019 08:49 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@refs
refs / custom_json.go
Created October 19, 2018 09:14 — forked from mdwhatcott/custom_json.go
Example of implementing MarshalJSON and UnmarshalJSON to serialize and deserialize custom types to JSON in Go. Playground: http://play.golang.org/p/7nk5ZEbVLw
package main
import (
"bytes"
"encoding/json"
"fmt"
"strconv"
)
func main() {