On nats_z2/0 (only NATS server):
$ sudo su
$ cd /var/vcap/bosh/bin
$ ./nats-server --port 12121 --user foo --pass bar
On api_z1/1 (Working CC, different AZ from NATS):
→ go test -bench=. -benchmem -benchtime=5s | |
PASS | |
BenchmarkMakeLen_Index8-4 100000000 70.7 ns/op 64 B/op 1 allocs/op | |
BenchmarkMakeLen_Index16-4 100000000 90.7 ns/op 128 B/op 1 allocs/op | |
BenchmarkMakeLen_Index32-4 50000000 132 ns/op 256 B/op 1 allocs/op | |
BenchmarkMakeLen_Index64-4 30000000 212 ns/op 512 B/op 1 allocs/op | |
BenchmarkMakeLen_Index128-4 20000000 362 ns/op 1024 B/op 1 allocs/op | |
BenchmarkMakeLen_Index256-4 10000000 675 ns/op 2048 B/op 1 allocs/op | |
BenchmarkMakeLen_Index512-4 5000000 1371 ns/op 4096 B/op 1 allocs/op | |
BenchmarkMakeLen_Index1024-4 3000000 2573 ns/op 8192 B/op 1 allocs/op |
On nats_z2/0 (only NATS server):
$ sudo su
$ cd /var/vcap/bosh/bin
$ ./nats-server --port 12121 --user foo --pass bar
On api_z1/1 (Working CC, different AZ from NATS):
FROM ubuntu:precise | |
MAINTAINER Mark Rushakoff <[email protected]> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev | |
RUN apt-get install -y wget |
package wrapped_func | |
// Run this benchmark with `go test -bench=.` | |
import "testing" | |
func BenchmarkSendItClean(b *testing.B) { | |
total := b.N | |
c := make(chan bool) | |
for i := 0; i < total; i++ { |
#!/bin/sh | |
BOOK_SRC="${$1:-Book.txt}" | |
cat "$BOOK_SRC" | xargs cat | # dump out all the files in the book | |
sed 's/%%.*$//g' | # naively strip comment delimiter to end of line | |
wc -w | # print out the word count |
#!/usr/bin/sh | |
git grep -c rescue . | # or whatever word it is you want | |
tr ':' "\t" | # translate grep -c delimiter to tab for sort | |
sort -nr -k2 # sort Numeric, Reverse, "kolumn" 2 |
> echo 'Hello!' > hello.txt | |
> # Create 2 tarballs at right about the same time: | |
> tar czf hello1.tar.gz hello.txt; tar czf hello2.tar.gz hello.txt | |
> md5 * # The tarballs have the same md5 | |
MD5 (hello.txt) = e134ced312b3511d88943d57ccd70c83 | |
MD5 (hello1.tar.gz) = bfdacca1166009500d60151d73c4da7e | |
MD5 (hello2.tar.gz) = bfdacca1166009500d60151d73c4da7e | |
> tar czf hello1.tar.gz hello.txt; tar czf hello2.tar.gz hello.txt | |
> md5 * # The tarballs have a different md5 | |
MD5 (hello.txt) = e134ced312b3511d88943d57ccd70c83 |
#!/usr/bin/env ruby | |
cmd = %q[echo '3...'; sleep 1; | |
echo '2...'; sleep 1; | |
echo '1...'; sleep 1; | |
echo 'Liftoff!'] | |
puts '------ beginning command ------' | |
output_log = [] | |
IO.popen(cmd).each do |line| |
syn on | |
set syn=auto | |
filetype on | |
filetype plugin on | |
filetype indent on | |
autocmd FileType haml set ts=2 shiftwidth=2 | |
autocmd FileType ruby set ts=2 shiftwidth=2 | |
autocmd FileType javascript set nocindent |
function add(a, b) { | |
return a + b; | |
} |