Skip to content

Instantly share code, notes, and snippets.

View pms1969's full-sized avatar

Paul Saunders pms1969

View GitHub Profile
@pms1969
pms1969 / cowsay.ban
Created March 23, 2023 08:30
Banner file for use in tests.
// this task does the unit testing of the app
task cowsay(image: kmcgivern/cowsay-alpine:latest, execute: r#""#) {r#""#}
@pms1969
pms1969 / build-ssm-agent.sh
Created August 13, 2019 14:32
script for building ssm agent on coreos
#!/bin/bash -e
export WORK_DIR=/opt/aws-ssm/ssm
export BIN_DIR=/opt/aws-ssm/bin
export CONFIG_DIR=/etc/amazon/ssm
export DOCKER_BUILD_BOX=ssm-build
export DOCKER_GOLANG_TAG=golang:1.9.2
export DOCKER_WORKSPACE=/workspace/src/github.com/aws/amazon-ssm-agent
if [ -e $BIN_DIR/amazon-ssm-agent ]; then exit 0; fi
[Match]
Name=weave datapath vxlan-6784
[Network]
Description=Network interfaces managed by weave
[Link]
Unmanaged=true
@pms1969
pms1969 / Version
Created August 31, 2017 14:35
Test sermver
0.0.1
@pms1969
pms1969 / curl-websocket.sh
Created August 1, 2017 12:23 — forked from htp/curl-websocket.sh
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@pms1969
pms1969 / gist:50badae84a33a6c678c27e087423638a
Created March 14, 2017 15:12 — forked from booherbg/gist:f812c9145d157d8945b2
Cross compiling a simple go server for windows

How to build Golang windows/arm static binaries from linux

Alternate title: Cross compiling Windows/Darwin/Linux amd64/386/arm all from linux

After fumbling around trying to figure out the go toolchain and cross compilation configuration, I ran across the wiki page on Go's homepage. It's super helpful, and worked out of the box. I'm including the necessary scripts here in case they get changed or lost, and we can help Google find it (since it's the first real source I've found that "Just Worked"). http://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling

@pms1969
pms1969 / nginx.conf
Created March 8, 2017 08:42 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@pms1969
pms1969 / git.config
Last active November 21, 2016 10:45
Git setup
[alias]
co = checkout
ci = commit
ls = branch
st = status
ls = branch -l
last = log -1 HEAD
unstage = reset HEAD --
lp = log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr) %C(yellow)%d%Creset %C(bold blue)<%an>%Creset' --abbrev-commit
ll = log -n 20 --pretty=format:'%Cred%h%Creset %<(55,trunc)%s %Cgreen(%<(7,trunc)%cr) %C(bold blue)<%<(5,trunc)%an>%Creset' --abbrev-commit
@pms1969
pms1969 / bumpme
Last active April 19, 2016 18:21
Tue Apr 19 18:21:19 UTC 2016