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
do something |
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 serve | |
import ( | |
"errors" | |
"io" | |
) | |
type pipedMessage struct { | |
buffer []byte | |
count int |
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 "time" | |
type entry struct { | |
key string | |
data []byte | |
expiration time.Time | |
lessRecent, moreRecent *entry | |
} |
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
default: run | |
gencert: | |
go run /home/aryszka/go/src/crypto/tls/generate_cert.go --host localhost | |
cert.pem: gencert | |
key.pem: gencert | |
init: cert.pem key.pem |
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 ( | |
"time" | |
"math/rand" | |
"log" | |
circuit "github.com/rubyist/circuitbreaker" | |
) |
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" | |
type syncMap chan map[string]int | |
func newSyncMap() syncMap { | |
m := make(map[string]int) | |
sm := make(syncMap, 1) | |
sm <- m |
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" | |
"math/rand" | |
"sync" | |
"time" | |
) | |
func produce(q chan<- int, n int) { |
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
/* | |
Try: | |
cat | go run rxstream.go '(?ms)(.*)42' '{"chars before 42": "$1"}' | |
And input: | |
abc42abc42 | |
*/ |
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" | |
"log" | |
"math/rand" | |
"os" | |
"time" | |
) |
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/mml | |
// sort csv by a column | |
import ( | |
csvparser "mml/parser/csv" | |
csvtemplate "mml/template/csv" | |
"mml/function" | |
"mml/lists" | |
"mml/log" |
OlderNewer