Skip to content

Instantly share code, notes, and snippets.

@mattfinlayson
mattfinlayson / autoproxy.rb
Created June 13, 2012 17:53
Using of to spin up a tiny proxy server in AWS.
#!/usr/bin/env ruby
require 'rubygems'
require 'fog'
ACCESS_KEY_ID='XXX'
SECRET_ACCESS_KEY='XXX'
ec2 = AWS::EC2::Base.new(:access_key_id => ACCESS_KEY_ID, :secret_access_key => SECRET_ACCESS_KEY)
@mattfinlayson
mattfinlayson / am.rb
Created June 13, 2012 17:51
right_aws example
#!/usr/bin/env ruby
require 'rubygems'
require 'right_aws'
require 'base64'
AMAZON_PUBLIC_KEY='XXX'
AMAZON_PRIVATE_KEY='XXX'
ec2 = RightAws::Ec2.new(AMAZON_PUBLIC_KEY, AMAZON_PRIVATE_KEY)
@mattfinlayson
mattfinlayson / gist:3860715
Created October 9, 2012 18:57
Hubot local setup with XMPP
# Using node.js and npm build from http://nodejs.tchol.org
#
sudo yum install http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm
sudo yum install nodejs-compat-symlinks npm
sudo npm install -g coffee-script
cd /opt
git clone git://github.com/github/hubot.git && cd hubot
@mattfinlayson
mattfinlayson / issue.py
Created June 5, 2013 19:54
Quick jira integration with python.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from jira.client import JIRA
import sys
import pprint
def connect_jira(jira_server, jira_user, jira_password):
'''
Connect to JIRA. Return None on error
{
"title": "Logstash Search",
"services": {
"query": {
"idQueue": [
1
],
"list": {
"0": {
"query": "*",

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:

@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
@mattfinlayson
mattfinlayson / gource.sh
Created December 13, 2011 18:37
Setting up Gource on OS X
brew install sdl sdl_image glew pcre
cd gource
./configure
make
sudo make install
cd ..
brew install ffmpeg
mkdir ~/.ffmpeg
@mattfinlayson
mattfinlayson / config.yaml
Created December 10, 2013 23:02
Little ruby script to take the results of a jql query (advanced search) in jira and create todo item's for Cultured Code's Things App. I use it at the beginning of a sprint to keep track of my own work and progress. If I get less lazy I could always sync back in the other direction.
username: "fred"
password: "freds_password"
base_url: "https://jira.yourcompany.com"
jql_query: "assignee = \"fred\" AND project = NewProject AND status = Open"
@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