Skip to content

Instantly share code, notes, and snippets.

Justin Clayton justinclayton

  • Seattle
Block or report user

Report or block justinclayton

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
zanedeg / aync.js
Created Jun 1, 2018
NodeJS async comparisons
View aync.js
'use strict';
const promisify = require('util').promisify;
const delay = (interval, cb) => {
console.log(`Waiting ${interval}s`);
setTimeout(() => cb(null, interval), interval);
const delayAsync = promisify(delay);
sjparkinson / RDS-Aurora-CloudFormation-Example.yaml
Last active Oct 23, 2019
A basic CloudFormation template for an RDS Aurora cluster.
View RDS-Aurora-CloudFormation-Example.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: >
A basic CloudFormation template for an RDS Aurora cluster.
AllowedPattern: "[a-zA-Z0-9]+"
ConstraintDescription: must be between 1 to 16 alphanumeric characters.
matt-deboer / Bakefile
Last active Sep 2, 2016
Bakefile to create a docker 1.12 swarm on OSX with docker-machine-driver-xhyve support
View Bakefile
set -u
#. creates a new swarm. params name, [driver], [workers], [managers]
create-swarm() {
bake_params name
local driver=${driver:=virtualbox}
local workers=${workers:=2}
local managers=${managers:=1}
stevschmid /
Created Sep 5, 2015
How the Track-o-Bot API works


Access any profile page by providing the username and API key (generated in the settings -> API) , e.g.


Any profile page can be requested as JSON. Simply add .json at the end of the url (but before the query string which starts with ?), see example above.

Use the browser to see the JSON structure. JSONView is an excellent browser extension which shows JSON in a nice way.

View custom.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Alpha Component</key>
<key>Blue Component</key>
View vm-list
#!/usr/bin/env ruby
require 'fileutils'
class VmList
@@cache_file = ENV['vm_list_cache_file'] || '/tmp/vm_list_cache'
@@cache_ttl = ENV['vm_list_cache_ttl'] || 60
def self.get_vm_list
vmware = %x{"/Applications/VMware\" list | grep -v Total}.split("\n")
curator / YAML.tmLanguage
Created Jun 26, 2014
Updated YAML that deals with hiera data a bit better (double colons)
View YAML.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
lutter /
Created Jun 25, 2014
Hook design document


Hooks provide a way to be notified of certain events during the operation of the Razor server; the behavior of a hook is defined by a hook type.

File layout for a hook type

Similar to brokers and tasks, hook types are defined through a .hook directory and files within that directory:

rothgar / main.yml
Last active Nov 14, 2019
Generate /etc/hosts with Ansible
View main.yml
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source.
# Will include all hosts the playbook is run on.
# Inspired from
- name: "Build hosts file"
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
arunoda / gist:7790979
Last active Nov 18, 2019
Installing SSHPass
View gist:7790979

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

You can’t perform that action at this time.