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):
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 <mark.rushakoff@gmail.com> | |
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++ { |
PASS | |
BenchmarkStringConcat-4 2000000 3901 ns/op | |
BenchmarkByteBuffer-4 10000000 966 ns/op |
#!/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; | |
} |