This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# General settings | |
# | |
# Set terminal titles | |
set -g set-titles on | |
# Expect UTF-8 | |
set -g utf8 on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
const Max = 10 | |
const Index = 1000000 | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git reflog expire --expire=1.minute refs/heads/master | |
git fsck --unreachable | |
git prune | |
git gc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"strings" | |
) | |
type ResponseError struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo | |
import ( | |
"reflect" | |
"appengine" | |
"appengine/datastore" | |
) | |
var ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assume the following exist and are set to unbuffered channels: | |
// var ( | |
// next chan Type | |
// in chan Type | |
// ) | |
go func() { | |
defer close(next) | |
// pending events (this is the "infinite" part) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type WaitList []*sync.WaitGroup | |
func (l WaitList) Done() { | |
for _, wg := range l { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: gencert.sh | |
# Generates SSL certificates | |
set -e | |
PREFIX="my_" | |
function oops() { | |
echo "Failed." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 # number of states | |
START | |
COLD | |
HOT | |
END | |
3 # size of vocab | |
1 | |
2 | |
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include $(GOROOT)/src/Make.inc | |
PROTOFILES=$(wildcard *.proto) | |
GOPROTOFILES=$(patsubst %.proto,%.pb.go,$(PROTOFILES)) | |
TARG=protopackage | |
GOFILES=\ | |
$(GOPROTOFILES)\ | |
CLEANFILES+=$(GOPROTOFILES) |
NewerOlder