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
let g:go_fmt_command = "goimports" | |
let g:go_fmt_options = "-f " . expand("%:p") |
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
ls vendor/github.com [master] 14:55:03 | |
AdRoll bitly deckarep go-ini jinzhu mattn pmezard shurcooL vbatts | |
Azure bmizerany denverdino go-sql-driver jmespath matttproud prometheus spf13 vdemeester | |
BurntSushi boltdb dgryski godbus joho miekg rakyll stathat vishvananda | |
DataDog bradfitz docker gogo jonboulle mitchellh rcrowley stevvooe wercker | |
Sirupsen bugsnag dotcloud golang julienschmidt ncw revel stretchr xordataexchange | |
agl cbroglie dvsekhvalnov google jwilder noahdesu robfig syndtr yvasiyarov | |
agtorre chuckpreslar feyeleanor gorilla kimor79 olekukonko |
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
--- a/restore_fixtures.sh | |
+++ b/restore_fixtures.sh | |
@@ -65,7 +65,8 @@ restore_to_mongo() { | |
local etcd_key="/services/mongodb" | |
echo "etcd key: $etcd_key" | |
- local host="$(sudo etcdctl ls --recursive $etcd_key | cut -d/ -f4)" | |
+ local host=$(sudo etcdctl ls --recursive "$etcd_key" | cut -d/ -f4) | |
local dump="$work_dir/dump/wercker" | |
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
Time Estimates: | |
plane - 10h Complete | |
office - 4h In Progress | |
meeting - 1h | |
meeting - 1h | |
dead - 12h | |
office - 4h | |
meeting - 2h | |
dead - 2h | |
plane - 2h |
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
// killProcesses sends a signal to all the processes on the machine except | |
// for PID 1, somewhat naive but seems to work | |
func (s *WatchStep) killProcesses(containerID string, signal string) error { | |
client, err := NewDockerClient(s.options.DockerOptions) | |
if err != nil { | |
return err | |
} | |
cmd := []string{`/bin/sh`, `-c`, fmt.Sprintf(`ps | grep -v PID | awk "{if (\$1 != 1) print \$1}" | xargs -n 1 kill -s %s`, signal)} | |
err = client.ExecOne(containerID, cmd, os.Stdout) | |
if err != nil { |
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
#!/bin/bash | |
APP_ID=<from wercker> | |
API_TOKEN=<from https://app.wercker.com/#profile/tokens> | |
GIT_BRANCH=master | |
#URL=https://app.wercker.com/api/project/${APP_ID}/build?token=${TOKEN} | |
RESULT=`curl --data-urlencode "branch=$GIT_BRANCH" https://app.wercker.com/api/project/${APP_ID}/build\?token\=$API_TOKEN` | |
echo $RESULT |
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
termie@champs-3:/usr/local/bin % awk --help [master] 15:07:57 | |
Usage: awk [POSIX or GNU style options] -f progfile [--] file ... | |
Usage: awk [POSIX or GNU style options] [--] 'program' file ... | |
POSIX options: GNU long options: (standard) | |
-f progfile --file=progfile | |
-F fs --field-separator=fs | |
-v var=val --assign=var=val | |
Short options: GNU long options: (extensions) | |
-b --characters-as-bytes | |
-c --traditional |
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
# add this to your .zshrc and then add | |
# $(__prompt_color) to your PROMPT | |
function __prompt_color() | |
{ | |
local RGB CONVERTED RH GH BH RD GD BD | |
RGB=$(echo $(pwd) | md5 | cut -c 1-6) | |
RH=$(echo ${RGB} | cut -c 1-2) | |
GH=$(echo ${RGB} | cut -c 3-4) |
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
// Also probably need a background page with tab permissions: https://developer.chrome.com/extensions/tabs | |
// listening for onCreated, onUpdated and do a | |
chrome.tabs.onCreated.addListener(tabCreated); | |
function tabCreated(tab) { | |
chrome.tabs.query({"windowId": tab.windowId}, function (tabList) { | |
tablist.forEach(function (aTab) { | |
aTab.sendMessage({"numTabs": tabList.size()}); | |
}) | |
}) |
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
# Ensure that etcd is starting fresh | |
config.vm.provision :shell, :inline => "systemctl stop etcd" | |
config.vm.provision :shell, :inline => "rm -rf /var/lib/etcd/*", :privileged => true | |
$script = <<SCRIPT | |
for x in $(cat /etc/environment); do | |
export $x | |
done | |
coreos-cloudinit --from-file /var/lib/coreos-vagrant/vagrantfile-user-data | |
SCRIPT |