Skip to content

Instantly share code, notes, and snippets.

Contributor License Agreement (“CLA”)
1. Definitions
1.1 "You" (or "Your") shall mean the copyright owner or legal entity
authorized by the copyright owner that is making this CLA with Cloudability
Inc. (“Cloudability”). For legal entities, the entity making a Contribution
and all other entities that control, are controlled by, or are under common
control with that entity are considered to be a single Contributor. For the
purposes of this definition, "control" means (i) the power, direct or

Keybase proof

I hereby claim:

  • I am mattfinlayson on github.
  • I am mattfinlayson (https://keybase.io/mattfinlayson) on keybase.
  • I have a public key whose fingerprint is 7BE1 BC3D F693 8233 6164 D983 3F11 5CCE F135 125C

To claim this, I am signing this object:

@mattfinlayson
mattfinlayson / pre-commit.sh
Created July 12, 2017 17:46
Puppet pre-commit hook
#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit
# Source RVM if needed
@mattfinlayson
mattfinlayson / pre-commit.sh
Created July 12, 2017 17:46
Puppet pre-commit hook
#!/bin/bash
# pre-commit git hook to check the validity of a puppet manifest
#
# Prerequisites:
# gem install puppet-lint puppet
#
# Install:
# /path/to/repo/.git/hooks/pre-comit
# Source RVM if needed
@mattfinlayson
mattfinlayson / install_consul.sh
Created April 21, 2016 18:03
Fast and dirty consul install
#!/usr/bin/env bash
set -e
export CONSUL_VERSION=0.6.3
export CONSUL_TEMPLATE_VERSION=0.12.1
echo "Fetching Consul..."
cd /tmp
include classpath("application.conf")
application.code="1234567890"
orient.baasbox.path="/opt/baasbox/db/baasbox"
orient.baasbox.backup.path="/opt/baasbox/db/backup"
push.baasbox.certificates.folder="/opt/baasbox/certificates"
@mattfinlayson
mattfinlayson / SMLoginViewController.1.swift
Last active August 29, 2015 14:23
Snippets from BaasBox and Swift - Part 2
import Foundation
class SMLoginViewController : UIViewController {
@IBOutlet weak var loginView: UIView!
@IBOutlet weak var signupView: UIView!
@IBOutlet weak var segmentedControl: UISegmentedControl!
@IBOutlet weak var loginUsernameField: UITextField!
@IBOutlet weak var loginPasswordField: UITextField!
@mattfinlayson
mattfinlayson / DearDiary-Bridging-Header.h
Created June 12, 2015 23:25
DearDiary-Bridging-Header.h
//
// DearDiary-Bridging-Header.h
// DearDiary
//
// Created by Matthew Finlayson on 5/7/15.
// Copyright (c) 2015 Cesare Rocchi. All rights reserved.
//
#ifndef DearDiary_DearDiary_Bridging_Header_h
#define DearDiary_DearDiary_Bridging_Header_h
@mattfinlayson
mattfinlayson / os_x_version.sh
Created March 20, 2015 22:13
Bash for determining OS X Version (Mavericks)
#!/bin/bash -x
DARWINOS_MAJOR=`sysctl -n kern.osrelease | cut -d . -f 1`
DARWINOS_MINOR=`sysctl -n kern.osrelease | cut -d . -f 2`
OS_X_MAJOR="10" # For context
OS_X_MINOR=`echo ${DARWINOS_MAJOR}-4 | bc` # Magic apple convention
OS_X_REVISION="${DARWINOS_MINOR}" # For completeness
OS_X_VERSION="${OS_X_MAJOR}.${OS_X_MINOR}.${OS_X_REVISION}"

Keybase proof

I hereby claim:

  • I am savagegus on github.
  • I am mattfinlayson (https://keybase.io/mattfinlayson) on keybase.
  • I have a public key whose fingerprint is 7BE1 BC3D F693 8233 6164 D983 3F11 5CCE F135 125C

To claim this, I am signing this object: