Skip to content

Instantly share code, notes, and snippets.

View dweomer's full-sized avatar
🤠
/nerdface

Jacob Blain Christen dweomer

🤠
/nerdface
View GitHub Profile
#!/bin/sh -x
export DOCKER_COMPOSE_VERSION=${DOCKER_COMPOSE_VERSION:-1.4.0}
sudo sh -xe << EOF
curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod -v +x /usr/local/bin/docker-compose
EOF
#!/bin/sh -x
export DOCKER_MACHINE_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
export DOCKER_MACHINE_ARCH=$(uname -m | sed -e 's/x86_64/amd64/g')
export DOCKER_MACHINE_VERSION=${DOCKER_MACHINE_VERSION:-0.4.1}
sudo sh -xe << EOF
curl -sL https://github.com/docker/machine/releases/download/v${DOCKER_MACHINE_VERSION}/docker-machine_${DOCKER_MACHINE_OS}-${DOCKER_MACHINE_ARCH} > /usr/local/bin/docker-machine
chmod -v +x /usr/local/bin/docker-machine
EOF
for b in $(git branch -r --merged origin/master | awk '{print $1}' | egrep -v '^stash')
do
echo -n "$b: " | egrep --color=always "$b" && git log -1 -s $b
done
@dweomer
dweomer / 00fun.txt
Created November 15, 2015 08:29 — forked from tobert/00fun.txt
Docker w/ link-local API
This is a silly example for dinking around with the Docker API on a link-local dummy interface.
#!/usr/bin/env bash
#
# Copyright 2012 Zemian Deng
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@dweomer
dweomer / keybase.md
Created July 8, 2016 00:15
keybase.md

Keybase proof

I hereby claim:

  • I am dweomer on github.
  • I am dweomer (https://keybase.io/dweomer) on keybase.
  • I have a public key ASCctZsc0vugGtNcl7K7y1BVNkcKP3TuK55XTBoplQBAggo

To claim this, I am signing this object:

#/bin/bash
STALE_SINCE=${STALE_SINCE:-"3 months"}
git for-each-ref --sort=-committerdate refs/remotes/origin --format='%(refname:short) %(committerdate:relative)' | \
while read REF RELDATE
do
if [ -z "$(git log -1 --since="${STALE_SINCE}" -s ${REF})" ]; then
echo $(echo ${REF} | grep --color=tty "${REF}"): ${RELDATE}
fi
@dweomer
dweomer / passwords.sh
Created May 17, 2017 20:35
random passwords
#!/bin/sh
curl 'https://www.random.org/passwords/?num=10&len=20&format=plain&rnd=new'
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
sudo apt-get update
sudo apt-get install -y docker-ce
@dweomer
dweomer / docker-root.sh
Created June 7, 2018 19:20
docker identity container
docker run --rm -v /:/host --net=host --pid=host --ipc=host --privileged -it alpine chroot /host