Skip to content

Instantly share code, notes, and snippets.

@tyru
tyru / detect_dirty_worktree.go
Created September 22, 2017 16:16
Try to detect worktree (currently not working)
package main
import (
"fmt"
"io/ioutil"
"os"
"os/user"
"path/filepath"
"strings"
@jojomi
jojomi / build.sh
Last active December 25, 2018 12:53
Simple bash script for cross-compiling Go code for release
#!/usr/bin/env sh
#
# For using UPX on linux, goupx (https://github.com/pwaller/goupx) needs to be
# available in $PATH.
# install goupx:
# GOPATH=${HOME}/.local go get github.com/pwaller/goupx
# sudo ln -s "${HOME}/.local/bin/goupx" "/usr/local/bin/"
#
# self reference: https://gist.github.com/jojomi/0eed777db2617e9fb0af#file-build-sh