Skip to content

Instantly share code, notes, and snippets.

View timfallmk's full-sized avatar

Tim timfallmk

  • San Francisco
  • 03:32 (UTC -12:00)
View GitHub Profile
@timfallmk
timfallmk / crackstack.sh
Last active August 29, 2015 14:08
A one command installer for lazy people for https://github.com/timfallmk/openstackgeek
#!/bin/bash
git clone https://github.com/timfallmk/openstackgeek.git
cd openstackgeek/icehouse
sudo rm ./*rc
# Temporary fix for repository stupidness
sed -i "s,trusty,precise," ./openstack_neutron_midonet.sh
@timfallmk
timfallmk / docker-install.sh
Last active August 29, 2015 14:22
Docker Install Everything
#!/bin/bash
echo "Installing Docker"
wget -qO- https://get.docker.com/ | sh
echo "Installing Docker Machine"
wget https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64
install -m 0660 -p docker-machine_linux-amd64/docker-machine /usr/local/bin/docker-machine
echo "Installing Docker Swarm"
@timfallmk
timfallmk / Docker Networking Blarg
Last active August 29, 2015 14:23
Docker Networking Blarg
##Cans and Some String
![The little daemon that could][midockerd]
_by [Tim Fall]_ [tim@midokura.com](https://cotap.me/timfall)
####Introduction
So we can all agree that Docker is cool. Containers are cool, repeatability is cool, portability is cool, we're all cool. Everything is unicorns and rainbows. But something is missing in this fairy tale land, and it's something we all like to forget about. With this wide world of other containers and services out there ("world wide web" anyone?), we want to make use of these things and connect ourselves in.
That's it! We forgot networking!
####Current State of Affairs
Well that's not **quite** fair, we didn't _forget_ it per say, we just all got caught up in building cool containers and plumb left it for later.
@timfallmk
timfallmk / startup-centos-7.sh
Last active September 22, 2015 02:19
Google Cloud Engine Startup Scripts
#!/bin/bash
sudo su # this may not be necessary, as it usually runs as root
yum install -y wget vim curl
yum update -y
curl -sSL https://get.docker.com/ | sh
systemctl start docker
# Possibly remove if the `nogroup` is present
groupadd nogroup
2013-10-11 19:18:16 INFO juju.environs open.go:156 environment info already exists; using New not Prepare
2013-10-11 19:18:16 INFO juju.environs.tools tools.go:181 filtering tools by released version
2013-10-11 19:18:16 INFO juju.environs.tools tools.go:85 reading tools with major.minor version 1.16
2013-10-11 19:18:16 INFO juju.environs.tools tools.go:96 filtering tools by series: precise
2013-10-11 19:18:17 WARNING juju.cmd.juju bootstrap.go:204 no tools available, attempting to retrieve from https://juju-dist.s3.amazonaws.com/
2013-10-11 19:18:17 INFO juju.environs.sync sync.go:66 listing available tools
2013-10-11 19:18:18 INFO juju.environs.sync sync.go:90 found 8 tools
2013-10-11 19:18:18 INFO juju.environs.sync sync.go:94 found 8 recent tools (version 1.16.0)
2013-10-11 19:18:18 INFO juju.environs.sync sync.go:100 listing target bucket
2013-10-11 19:18:21 INFO juju.environs.sync sync.go:113 found 3 tools in target; 5 tools to be copied
@timfallmk
timfallmk / keybase.md
Created May 5, 2016 22:28
Keybase.io Identity File

Keybase proof

I hereby claim:

  • I am timfallmk on github.
  • I am timfall (https://keybase.io/timfall) on keybase.
  • I have a public key whose fingerprint is 7D50 6007 96AE 1E85 3F27 B9B1 ED4F D8C0 6159 D02F

To claim this, I am signing this object:

Vault 0: Components and Design

Vault From the Beginning

Most of the software we deal with day to day fits into a few basic categories: user applications, service applications, assistive tools, etc. When we download something new and open it up, we usually know which general category it fits into and where it should fit in our workflow. We might expect the same from Vault, but there is a key difference. Vault is a security application, designed specifically to provide a number of features for use in a security workflow. Oftentimes, the most difficult part of learning to use Vault is that it doesn’t fit into any of the traditional categories that we are used to interacting with, and therefore lacks a common set of concepts that we might already be familiar with. We will attempt to provide this context and all the background necessary for using Vault.

In this series of posts we will cover Vault in its entirety, from nose to tail, and walk through each step of understanding and effectively using

@timfallmk
timfallmk / README.md
Last active August 12, 2016 22:39
GitHub API in Bash exercise

GitHub Network Graph

Purpose

This script mimics the "Network Graph" display on GitHub.com in that it fetches the number of forks of a given repo and displays the distance (commits ahead or behind) it is from the upstream repository (the repository it is forked from).

Design

The script is intended to be simple and as modular as possible without using outside dependencies. It is of course mostly a thought experiment as doing this kind of thing in bash is a bit insane.

There a few main components:

  • Two functions called get_fork_user and get_fork_branch take in a single argument (the index of a forked repo from the list generated by a later command) and returns the user and default branch of that fork, respectively
@timfallmk
timfallmk / docker-compose.yml
Last active August 15, 2016 22:57
Example `docker-compose` file for a simple three tier web app
# This is a basic example `docker-compose.yml` file using a 3 tier web app.
service: api
image: apache:latest
links:
- db:database
service: frontend
image: ubuntu:latest
links:
- api
@timfallmk
timfallmk / Dockerfile
Last active June 21, 2017 18:38
Look at all the work!
FROM ubuntu
COPY ./* /
RUN chmod +x /*.sh
CMD /run.sh