This file contains hidden or 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
DOCKER_COMPOSE := $(shell command -v docker-compose 2>/dev/null) | |
ifndef DOCKER_COMPOSE | |
DOCKER_COMPOSE = docker run --rm -i --volume /var/run/docker.sock:/var/run/docker.sock --volume $(shell pwd):/composefile -w /composefile docker/compose:1.8.1 | |
endif |
This file contains hidden or 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
all: | |
make build | |
make objdump | |
build: | |
go build -gcflags -m main.go | |
objdump: | |
go tool objdump -s "main.main" main | grep CALL |
This file contains hidden or 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
var start = Date.now(); | |
$.ajax({ | |
method: 'GET', | |
url: 'someurl' | |
}) | |
.done(function () { | |
$someElement.html('<div id="results"></div>'); | |
console.log("done", Date.now() - start); | |
}) | |
.fail(function () { |
This file contains hidden or 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 "somelibrary" | |
import "flags" | |
func main() { | |
someFlag := somelibrary.Impls.Flag() | |
flags.Parse() | |
someImpl := somelibrary.GetImpl(someFlag) | |
run(someImpl) |
This file contains hidden or 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
https://github.com/golang/go/issues/15451 |
This file contains hidden or 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
alias viewgraph='pbpaste | dot -Tpdf | open -f -a /Applications/Preview.app' |
This file contains hidden or 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
<!DOCTYPE HTML><html lang="en-US" prefix="og: http://ogp.me/ns#"><head><link rel="stylesheet" type="text/css" href="https://cdn.n0where.net/wp-content/cache/minify/000000/c455a/default.include.6ddebb.css" media="all" /><script defer type="text/javascript" src="https://cdn.n0where.net/wp-content/cache/minify/000000/c455a/default.include.80798f.js"></script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"><link rel="shortcut icon" href="https://cdn.n0where.net/wp-content/uploads/2014/03/favicon.gif" /><meta property="og:image" content="https://cdn.n0where.net/wp-content/uploads/2015/06/systemd.jpg" /><title>Understanding Systemd</title><script type="text/javascript">var ajaxurl='https://n0where.net/wp-admin/admin-ajax.php',ap_nonce='63f0fe5e7b',ap_max_tags='5';disable_hover_card=false;</script><meta name="robots" content="noodp,noydir"/><meta name="description" content="Understanding systemd - suite of sy |
This file contains hidden or 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
function repeattest { | |
go test -c | |
while [ $? -eq 0 ]; do | |
GOMAXPROCS=$[ 1 + $[ RANDOM % 100 ]] ./`ls *.test` -test.v $1 2>&1 | |
done | |
} |
This file contains hidden or 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
alias s='git status' | |
alias test='go test -v 2>&1' | |
alias d='git diff' | |
alias f='gofmt -w -s -l .' |
This file contains hidden or 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
./test.test -test.cpuprofile=x.prof -test.run=XXX -test.bench=MyBenchmark | |
go tool pprof --svg test.test x.prof > x.svg |