I hereby claim:
- I am ereyes01 on github.
- I am ereyes01 (https://keybase.io/ereyes01) on keybase.
- I have a public key ASDdoGe-N-TUyHMeOQJrecWZGLkdx0lLecOcUeyFaFj4NQo
To claim this, I am signing this object:
box.start() | |
box.add_user(username="admin", home_dir="/home/admin", | |
shell="/bin/bash") | |
box.install_packages(['python-dev', | |
'python-pip', | |
'redis-server', | |
'openssh-server', | |
'libffi-dev']) |
$ cat box-start.json | |
{ | |
"name" : "my-server", | |
"state" : "running" | |
} | |
$ curl -v -H "Content-Type: application/json" -X PUT \ | |
--data "@box-start.json" -H "X-Containable-API-Key" \ | |
https://containable-server.com/boxes/my-server | |
$ cat add-admin.json | |
{ |
""" | |
A simple script that deploys the website deployment module to an EC2 server. | |
""" | |
import containable | |
import my_website | |
website_blueprint = my_website.MyWebsite(nginx_config_path="/work/my-nginx.conf", | |
git_url="http://github.com/me/website.git") |
$ cd /opt/myproject | |
$ tasqr git clone http://github.com/me/mywebsite.git | |
Saving "git clone..." | |
$ tasqr cp services/emailer.conf /etc/init/ | |
Saving "sudo services/..." | |
$ tasqr initctl start emailer | |
Saving "initctl start..." |
package main | |
import ( | |
"log" | |
"os" | |
"os/signal" | |
"strconv" | |
"github.com/FogCreek/victor" | |
"github.com/FogCreek/victor/pkg/chat/slackRealtime" |
#!/usr/bin/env python | |
import json | |
import sys | |
import subprocess | |
count = int(sys.argv[1]) | |
url = sys.argv[2] | |
curl = "curl -so /dev/null -w '" + '{"http_code": %{http_code}, "time_total": %{time_total}, "time_namelookup": %{time_namelookup}, "time_connect": %{time_connect}, "time_appconnect": %{time_appconnect}, "time_pretransfer": %{time_pretransfer}, "time_redirect": %{time_redirect}, "time_starttransfer": %{time_starttransfer}, "size_download": %{size_download}, "size_upload": %{size_upload}, "size_header": %{size_header}, "size_request": %{size_request}, "speed_download": %{speed_download}, "speed_upload": %{speed_upload} }' + "' " |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
"strings" |
I hereby claim:
To claim this, I am signing this object:
The compiler error we hit as we were running out of time was due to the invisible underscores! Somehow, I had typed:
for_h := range ...
but we couldn't see the underscore due to the problem with my editor and the font size change!
There was one more problem I fixed in the reducer, besides the compiler error. A common pitfall in Go is when you write a loop with an inner function / go routine that uses the containing loop's iterator... you need to pass the value as an argument of the inner function, or otherwise all the go routines will share the same variable containing the last value of the loop!
The benchmarks on my computer: No concurrency: 18s