Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Wilhelm Murdoch wilhelm-murdoch

🎯
Focusing
Block or report user

Report or block wilhelm-murdoch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wilhelm-murdoch
wilhelm-murdoch / cidr.py
Last active Feb 14, 2019
Ensure given VPC subnets have zero overlap.
View cidr.py
#!/usr/bin/env python
import ipaddr
accounts = {
'flood-beta': {
'public': [
'10.1.32.0/20',
'10.1.96.0/20',
'10.1.160.0/20'
@wilhelm-murdoch
wilhelm-murdoch / K8s-DigitalOcean-CoreOS.md
Created Mar 23, 2018 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS
View K8s-DigitalOcean-CoreOS.md

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
View wtf
Gost - A simple command line utility for easily creating Gists for Github
Usage:
gost (--file=<file> | --clip) [--name=<name>] [--description=<description>] [--token=<token>] [--public]
gost (--help | --version)
Options:
-t --token=<token> Optional Github API authentication token. If excluded, your Gist will be created anonymously.
-f --file=<file> Create a Gist from file.
-n --name=<name> Optional name for your new Gist.
View wtf
Gost - A simple command line utility for easily creating Gists for Github
Usage:
gost (--file=<file> | --clip) [--name=<name>] [--description=<description>] [--token=<token>] [--public]
gost (--help | --version)
Options:
-t --token=<token> Optional Github API authentication token. If excluded, your Gist will be created anonymously.
-f --file=<file> Create a Gist from file.
-n --name=<name> Optional name for your new Gist.
View gist:10396975
Gost - A simple command line utility for easily creating Gists for Github
Usage:
gost (--file=<file> | --clip) [--name=<name>] [--description=<description>] [--token=<token>] [--public]
gost (--help | --version)
Options:
-t --token=<token> Optional Github API authentication token. If excluded, your Gist will be created anonymously.
-f --file=<file> Create a Gist from file.
-n --name=<name> Optional name for your new Gist.
@wilhelm-murdoch
wilhelm-murdoch / ngNumber.js
Created Sep 10, 2013
A better variation of AngularJS' ngNumber filter ...
View ngNumber.js
/**
* Number Filter
* @Param input The number to format
* @Param fractionSize Nubmer of decimal places to round to; defaults to 2
* @Param groupSep Number group separator; defaults to a single space ' '
* @Param decimalSep Decimal place separator; defaults to single period
* @return string, ex: 1 234 345
*/
var DECIMAL_SEP = '.' // change to override default
var GROUP_SEP = ' ' // change to override default
@wilhelm-murdoch
wilhelm-murdoch / aggregation_test.py
Created Aug 18, 2013
Testing MongoDB aggregation problem. Creates 10 posters and randomly assigns them to 100 posts. Aggregation query returns mapping of poster to latest post sorted by creation date in descending order.
View aggregation_test.py
from pymongo import MongoClient
import datetime
import bunch
from faker import Faker
from random import choice
client = MongoClient(host="localhost", port=27017)
faker = Faker()
posters = []
@wilhelm-murdoch
wilhelm-murdoch / arthur.itermcolors
Last active Sep 30, 2016
My personal fish shell setup for iTerm 2 ...
View arthur.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.16470588743686676</real>
<key>Green Component</key>
<real>0.20784313976764679</real>
@wilhelm-murdoch
wilhelm-murdoch / generate_inkwell_articles.py
Last active Dec 19, 2015
A python script for creating a ton of test articles for Inkwell.
View generate_inkwell_articles.py
import sys
import os
from random import choice
if len(sys.argv) < 2:
print 'Usage: python {} /absolute/path/to/article/directory'.format(os.path.basename(__file__))
exit()
content = """title: Pokedex for {}
summary: true
@wilhelm-murdoch
wilhelm-murdoch / gist:5909320
Created Jul 2, 2013
Google image chart demo...
View gist:5909320
https://chart.googleapis.com/chart?cht=bvs&chs=750x50&chd=t:0,0,0,0,0,10,50,60,80,40&chco=EBF2FF&chbh=25,1&chm=r,FFFFFF,0,-0.01,0.01,1|R,FFFFFF,0,-0.01,0.01,1
You can’t perform that action at this time.