Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
@jamtur01
jamtur01 / pre-commit
Created October 18, 2016 21:54
A Terraform validation and formatting pre-commit hook
View pre-commit
#!/usr/bin/env bash
set -e
# Formats any *.tf files according to the hashicorp convention
files=$(git diff --cached --name-only)
for f in $files
do
if [ -e "$f" ] && [[ $f == *.tf ]]; then
#terraform validate `dirname $f`
terraform fmt $f
@jamtur01
jamtur01 / ladder.md
Last active April 14, 2023 14:35
Kickstarter Engineering Ladder
View Dockerfile
FROM ubuntu:12.04
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk curl git-core build-essential bzr
RUN mkdir -p /tmp/downloads
# install go
RUN curl -sf -o /tmp/downloads/go1.1.1.linux-amd64.tar.gz -L https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
RUN mkdir -p /opt && cd /opt && tar xfz /tmp/downloads/go1.1.1.linux-amd64.tar.gz
# install jenkins
RUN curl -sf -o /opt/jenkins-1.523.war -L http://mirrors.jenkins-ci.org/war/1.523/jenkins.war
View openpgp.md

openpgp4fpr:A2C861F07924C92D698D5DDA6AFC66C2625EC8BB

@jamtur01
jamtur01 / convert.py
Created July 1, 2022 18:02 — forked from mturilin/convert.py
Converst TextExpander csv to espanso yaml
View convert.py
#!/usr/bin/python3
import yaml
import sys
import csv
# create root yaml
matches = []
# open file
@jamtur01
jamtur01 / gist:4384428
Created December 27, 2012 00:46
Java stack trace logstash regex
View gist:4384428
(^\d+\) .+)|(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)
@jamtur01
jamtur01 / c4q_techinterview.md
Last active July 9, 2021 12:48
C4Q Technical Interview Slides
View c4q_techinterview.md

Interviewing for Engineering roles


Workshop timetable

  • 15 mins Introduction

Per interview.

@jamtur01
jamtur01 / gist:9458261
Created March 10, 2014 02:03
Murmur launch
View gist:9458261
docker run -i -t jamtur01/mumur
Unable to load library icui18n "Cannot load library icui18n: (libicui18n.so.48: cannot open shared object file: No such file or directory)"
Failed to set initial capabilities
<W>2014-03-10 02:02:59.776 Initializing settings from /.murmurd/murmur.ini (basepath /.murmurd)
<W>2014-03-10 02:02:59.777 OpenSSL: OpenSSL 1.0.1 14 Mar 2012
<W>2014-03-10 02:02:59.777 SSL: Adding recommended CA StartCom Certification Authority
<W>2014-03-10 02:02:59.777 SSL: Adding recommended CA AAA Certificate Services
<W>2014-03-10 02:02:59.778 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<C>2014-03-10 02:02:59.778 WARNING: You are running murmurd as root, without setting a uname in the ini file. This might be a security risk.
<W>2014-03-10 02:02:59.782 ServerDB: Openend SQLite database /murmur.sqlite
View buttons.lua
ConROC.Spells = {};
ConROC.Keybinds = {};
ConROC.DefSpells = {};
ConROC.Flags = {};
ConROC.SpellsGlowing = {};
ConROC.WindowsGlowing = {};
ConROC.DefGlowing = {};
ConROC.DefWindowsGlowing = {};
ConROC.DamageFramePool = {};
ConROC.DamageFrames = {};
View warrior_spellmenu.lua
local ConROC_Warrior, ids = ...;
local lastFrame = 0;
local lastDebuff = 0;
local lastRage = 0;
local lastStun = 0;
local plvl = UnitLevel('player');
local defaults = {