Skip to content

Instantly share code, notes, and snippets.

View rjeczalik's full-sized avatar
💭
defer sleep()

Rafal Jeczalik rjeczalik

💭
defer sleep()
View GitHub Profile
package main
import (
"errors"
"flag"
"fmt"
"log"
"log/syslog"
"os"
"os/exec"
#!/bin/bash
toggle-go() {
local version="${1-}"
if [[ ! -z "$version" ]]; then
toggle-go-install "$version"
else
version=$(toggle-go-next "$(toggle-go-current)")
fi
package main
import (
"bufio"
"errors"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"os"
)
#!/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}) ..."
#!/bin/bash
toggle-go() {
local version="${1-}"
if [[ ! -z "$version" ]]; then
toggle-go-install "$version"
else
version=$(toggle-go-next "$(toggle-go-current)")
fi
#!/bin/bash -x
set -euo pipefail
bucket=${1:-}
srcAccount=${2:-}
dstAccount=${3:-}
die() {
echo $* 1>&2
@rjeczalik
rjeczalik / guesslicense.go
Created November 22, 2016 09:34
Guesses license type (depracated, use GitHub API instead).
package main
import (
"bufio"
"errors"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
0x7480f51dfc9b982a9087873f74bf5bd86c1e89ac
INFO [07-16|17:25:57] Commit new mining work number=1141452 txs=28 uncles=0 elapsed=726.365ms
unexpected fault address 0x10a5b4c08
fatal error: fault
unexpected fault address 0x10a1cd008
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10a5b4c08 pc=0x405d297]
goroutine 168304 [running]:
runtime.throw(0x4a9bd22, 0x5)
/usr/local/opt/go/libexec/src/runtime/panic.go:596 +0x95 fp=0xc426ff39f0 sp=0xc426ff39d0
runtime.sigpanic()