Skip to content

Instantly share code, notes, and snippets.

View milas's full-sized avatar
😸

Milas Bowman milas

😸
View GitHub Profile
@milas
milas / go-mod-version.sh
Last active September 21, 2022 15:06
Extract Go version from go.mod
# These have been tested against:
# macOS 12.6 / built-in
# Alpine 3.16.2 / BusyBox v1.35
# Debian 11.5 / GNU sed v4.7
# short, readable, should be fine for most purposes!
sed -n -e 's/^go \(.*\)$/\1/p' go.mod
# strict based on https://go.dev/ref/mod#go-mod-file-go
# > The version must be a valid Go release version: a positive
@milas
milas / README.md
Created December 13, 2021 16:05
Kubernetes skycfg to YAML

skycfg-k8s-example

Small example showing how to execute a Skycfg Starlark script and serialize the result as YAML.

Running

$ go run . nginx.sky
metadata:
 name: nginx
@milas
milas / Microsoft.PowerShell_profile.ps1
Last active December 22, 2015 16:09
Add useful git extensions courtesy of the GitHub app to all your PowerShell terminals
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
if (test-path env:github_posh_git) {
. $env:github_posh_git\profile.example.ps1
}
@milas
milas / .gitconfig
Last active November 8, 2017 11:30
Settings for using Visual Studio 2012 as a diff and merge (3-way) tool for git
[diff]
tool = vsdiffmerge
[difftool]
prompt = true
[difftool "vsdiffmerge"]
cmd = \""C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\vsdiffmerge.exe"\" \""$LOCAL"\" \""$REMOTE"\" //t
keepbackup = false
trustexistcode = true
[merge]
tool = vsdiffmerge