View gist:0346a6d4228943919aac
  1. General Background and Overview
View b62.go
1 2 3 4 5
package main
 
func main() {
fmt.Println("Hello")
}
View bitwise.go
1 2 3 4 5
package main
 
func main() {
fmt.Println("1 + 1")
}
View gom.go
1 2 3 4 5 6 7 8 9 10
package main
 
import (
"fmt"
"log"
 
"github.com/bradfitz/gomemcache/memcache"
)
 
func main() {
View piping.go
1 2 3 4 5 6 7 8 9 10
package main
 
import (
"bytes"
"exec"
"log"
"os"
)
 
// Pipeline strings together the given exec.Cmd commands in a similar fashion
View cmdlinefu.txt
1
find . -type f -size +1| xargs sed -ie '$s/$/\n/'
View output.txt
1 2 3 4 5 6 7 8 9 10
w size commit elapsed
1 1 1000 1.545
1 10 1000 0.307
1 50 1000 0.161
1 100 1000 0.131
1 500 1000 0.108
1 1000 1000 0.112
2 1 1000 1.231
2 10 1000 0.237
2 50 1000 0.121
View thoughts.md

Thoughts on JSON Patch

Introduction

JSON Patch is a media type developed to take advantage of the HTTP PATCH method. It includes operations such as add, remove, replace, copy, move, and test. Below is a first reaction to reading the specification. Note that the author has not attempted a real implementation of JSON Patch, which would certainly provide a more thorough analysis and different perspective.

Benefits

  1. The JSON Patch specification provides an actual media type to use with PATCH. This enables the PATCH method to be usable across client-server implementations. It's a real attempt at solving the partial update problem in Web APIs.
  2. JSON Patch documents allow shallow and nested object updates.
View bash_prompt.sh
1 2 3 4 5 6 7 8 9
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png
 
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
View fieldclf.go
1 2 3 4 5
package main
 
func main() {
fmt.Println("fieldclf, a MARC field classifier.")
}
Something went wrong with that request. Please try again.