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
#!/bin/bash -x | |
set -euo pipefail | |
bucket=${1:-} | |
srcAccount=${2:-} | |
dstAccount=${3:-} | |
die() { | |
echo $* 1>&2 |
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
#!/bin/bash | |
toggle-go() { | |
local version="${1-}" | |
if [[ ! -z "$version" ]]; then | |
toggle-go-install "$version" | |
else | |
version=$(toggle-go-next "$(toggle-go-current)") | |
fi |
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
#!/bin/bash | |
delete-vpc() { | |
local teamName=${1:-myteam} | |
local region=${2:-us-east-1} | |
aws ec2 describe-vpcs --region ${region} | jq -r ".Vpcs[] | select(.Tags[].Value | contains(\"${teamName}\")) | .VpcId" 2>/dev/null | | |
while read vpcID; do | |
echo "# deleting vpc (${vpcID}) ..." | |
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 ( | |
"bytes" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
"os" | |
) |
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 ( | |
"bufio" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strings" |
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
#!/bin/bash | |
toggle-go() { | |
local version="${1-}" | |
if [[ ! -z "$version" ]]; then | |
toggle-go-install "$version" | |
else | |
version=$(toggle-go-next "$(toggle-go-current)") | |
fi |
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 ( | |
"errors" | |
"flag" | |
"fmt" | |
"log" | |
"log/syslog" | |
"os" | |
"os/exec" |
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 ( | |
"log" | |
"os" | |
"sync" | |
"github.com/rjeczalik/notify" | |
) |
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 boolmap | |
// BoolMap is a data structure for storing binary | |
// states of elements indexed by non-negative | |
// integer key. | |
type BoolMap []byte | |
// New gives new bool map capable of storing state for | |
// n elements without growing. | |
func New(n int) BoolMap { |