Skip to content

Instantly share code, notes, and snippets.

View thbishop's full-sized avatar

Tommy Bishop thbishop

View GitHub Profile
@dysinger
dysinger / coreos-kubernetes-vpc-playbook.yml
Created November 14, 2014 21:40
CoreOS Kubernetes AWS VPC Playbook
---
- connection: local
hosts: 127.0.0.1
tasks:
- local_action:
description: Kubernetes Security Group
module: ec2_group
name: kubernetes
region: '{{ aws.region }}'
rules:
@dysinger
dysinger / aws-cfn-coreos-kubernetes.json
Last active September 9, 2019 01:31
CoreOS Kubernetes on AWS CloudFormation
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings": {
"RegionMap": {
"ap-northeast-1": {
"AMI": "ami-f9b08ff8"
},
"ap-southeast-1": {
"AMI": "ami-c24f6c90"
@progrium
progrium / prog
Last active January 20, 2017 18:48
playing around with a little bash subcommand environment
#!/bin/bash
cmd-hello() {
declare desc="Displays a friendly hello"
declare firstname="$1" lastname="$2"
echo "Hello, $firstname $lastname."
}
cmd-help() {
declare desc="Shows help information for a command"
@danrigsby
danrigsby / packer-ami-id
Last active December 14, 2023 15:07
Get AMI ID from a packer build
packer build packer.json 2>&1 | sudo tee output.txt
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt
@dysinger
dysinger / docker-ruby-fpm.sh
Last active August 29, 2015 13:56
Stop using rbenv & rvm on servers. plz. kthnx.
cat > Dockerfile <<\EOF
FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y ruby1.9.3 build-essential \
libc6-dev libffi-dev libgdbm-dev libncurses5-dev \
libreadline-dev libssl-dev libyaml-dev zlib1g-dev
RUN gem install fpm --bindir=/usr/bin --no-rdoc --no-ri
RUN apt-get install -y curl
RUN curl ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz|tar oxzC /tmp
WORKDIR /tmp/ruby-1.9.3-p484
@jordansissel
jordansissel / gist:7819452
Created December 6, 2013 06:29
Let's "git checkout" any pull request.
porkrevenge(~/build/fpm) % git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
porkrevenge(~/build/fpm) % tail -2 ~/.gitconfig
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pull/*
@arr2036
arr2036 / delay.sh
Last active June 17, 2024 14:26
Simple script to introduce delay on outbound packets to one or more (run multiple times) ip addresses
#!/bin/bash
# root qdisc handle
r_handle=1
# netem qdisc handle
n_handle=2
interface=
delay=
dstip=
qdpresent=
@weavenet
weavenet / cfn-signal.sh
Last active December 18, 2015 19:39
Cloud Formation Template and scripts to create AMI via Roark and Heirloom.
#!/bin/bash
#
# This script will signal the provided Cloud Formation URL with success or failue.
# Result is expected to be the return code of a configuration management script.
# Success will only be signaled if the script returns 0
export result=$1
export url=$2
function help {

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@whiteley
whiteley / md.go
Last active September 1, 2016 04:43
Crawl EC2 meta-data and output JSON
package main
import "bytes"
import "bufio"
import "encoding/json"
import "flag"
import "fmt"
import "net/http"
import "os"
import "strings"