Skip to content

Instantly share code, notes, and snippets.

View mtibben's full-sized avatar

Michael Tibben mtibben

View GitHub Profile
@mtibben
mtibben / main.go
Last active February 6, 2018 19:59
Tibbo's go workshop
package main
import (
"bytes"
"encoding/json"
"fmt"
"html"
"html/template"
"io/ioutil"
"log"
# https://github.com/nodesource/distributions/issues/33
NODE_VERSION 8.11.2
RUN set -eax \
; curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
; . /etc/lsb-release \
; export NODE_MAJOR_VERSION="$(echo ${NODE_VERSION} | cut -d . -f1)" \
; echo "deb https://deb.nodesource.com/node_$NODE_MAJOR_VERSION.x $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/nodesource.list \
; apt-get update \
; apt-get install -y nodejs=$NODE_VERSION
@mtibben
mtibben / gist:ba5f96aae45d4f9b7ca6e5114200e9af
Created August 16, 2020 06:17
poll for aws vault process
func isProcessUp(pid int) bool {
process, err := os.FindProcess(pid)
if err != nil {
return false
} else {
return process.Signal(syscall.Signal(0)) == nil
}
}
func pollAwsVaultProcessAndExitWhenGone() {