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
{ type: 'Program', | |
body: | |
[ { type: 'FunctionDeclaration', | |
id: { type: 'Identifier', name: 'main' }, | |
params: [], | |
kind: { type: 'Identifier', name: 'int' }, | |
body: | |
{ type: 'BlockStatement', | |
body: | |
[ { type: 'VariableStatement', |
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
{ type: 'Program', | |
body: | |
[ { type: 'FunctionDeclaration', | |
id: { type: 'Identifier', name: 'count' }, | |
params: | |
[ { type: 'FormalParameter', | |
id: { type: 'Identifier', name: 'n' }, | |
kind: | |
{ type: 'VariableType', | |
kind: { type: 'Identifier', name: '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
console.log('starting with node %s', process.version) | |
setInterval(function(){ console.log('running') }, 5000) |
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
avg-cpu: %user %nice %system %iowait %steal %idle | |
21.28 0.00 1.28 0.00 0.00 77.44 | |
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util | |
xvda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | |
xvdb 0.00 5271.00 1163.00 2835.00 4652.00 37240.00 20.96 3.20 0.80 0.27 1.02 0.06 24.80 | |
avg-cpu: %user %nice %system %iowait %steal %idle | |
21.23 0.00 1.02 0.26 0.26 77.24 |
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
type Worker struct { | |
*context.Context | |
} | |
func (w *Worker) SomeMethod(){ | |
... | |
w.Stats.IncrBy(n, "events", "published") | |
w.Log.Info("parsed %s in %s (size=%s) (events=%d)", file, time.Since(start), size, n) | |
} |
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
ctx, err := context.New("red-extract", Version, args["--apex"].(string)) |
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 "github.com/segmentio/rpc" | |
import "fmt" | |
type Args struct { | |
A int | |
B 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
2015/02/10 08:12:33 [pub] clear events topic | |
2015/02/10 08:12:33 [sub] [events:example] clear | |
2015/02/10 08:12:33 [pub] publish events hello 0 | |
2015/02/10 08:12:34 [pub] publish events hello 1 | |
2015/02/10 08:12:34 [pub] publish events hello 2 | |
2015/02/10 08:12:34 [pub] publish events hello 3 | |
2015/02/10 08:12:34 [pub] publish events hello 4 | |
2015/02/10 08:12:34 [pub] publish events hello 5 | |
2015/02/10 08:12:34 [pub] publish events hello 6 | |
2015/02/10 08:12:34 [pub] publish events hello 7 |
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
# FoundationDB server | |
# | |
# Run this file, then on one machine run: | |
# $ sudo /usr/lib/foundationdb/make_public.py | |
# | |
# Copy /etc/foundationdb/fdb.cluster to each node and run: | |
# $ sudo service foundationdb restart | |
# | |
set -e |
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
body { | |
background-color: white; | |
color: rgba(0,0,0,0.8); | |
} | |
#editor { | |
box-shadow: none | |
} | |
ul.listtype-hone { |