Skip to content

Instantly share code, notes, and snippets.

View jamtur01's full-sized avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
@jamtur01
jamtur01 / ladder.md
Last active April 14, 2024 22:28
Kickstarter Engineering Ladder
{"tabs":["overview","table","matches","stats"],"allAvailableSeasons":["2023/2024","2022/2023","2021/2022","2020/2021","2019/2020","2018/2019"],"details":{"id":9907,"type":"league","name":"Liga F","selectedSeason":"2023/2024","latestSeason":"2023/2024","shortName":"Liga F","country":"ESP","faqJSONLD":null,"breadcrumbJSONLD":{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.fotmob.com"},{"@type":"ListItem","position":2,"name":"Liga F","item":"https://www.fotmob.com/leagues/9907/overview/liga-f"}]}},"seostr":"liga-f","QAData":[],"table":[{"data":{"ccode":"ESP","leagueId":9907,"pageUrl":"/leagues/9907/overview/liga-f","leagueName":"Liga F","legend":[{"title":"Champions League","tKey":"championsleague","color":"#2AD572","indices":[0]},{"title":"Champions League qualification","tKey":"clqual","color":"#FFD908","indices":[1,2]},{"title":"Relegation","tKey":"relegation","color":"#FF4646","indices":[14,15]}],"ongoing":[{"id":
@jamtur01
jamtur01 / pre-commit
Created October 18, 2016 21:54
A Terraform validation and formatting pre-commit hook
#!/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
{"tabs":["overview","table","matches","stats"],"allAvailableSeasons":["2023/2024","2022/2023","2021/2022","2020/2021","2019/2020","2018/2019"],"details":{"id":9907,"type":"league","name":"Liga F","selectedSeason":"2023/2024","latestSeason":"2023/2024","shortName":"Liga F","country":"ESP","faqJSONLD":null,"breadcrumbJSONLD":{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.fotmob.com"},{"@type":"ListItem","position":2,"name":"Liga F","item":"https://www.fotmob.com/leagues/9907/overview/liga-f"}]}},"seostr":"liga-f","QAData":[],"table":[{"data":{"ccode":"ESP","leagueId":9907,"pageUrl":"/leagues/9907/overview/liga-f","leagueName":"Liga F","legend":[{"title":"Champions League","tKey":"championsleague","color":"#2AD572","indices":[0]},{"title":"Champions League qualification","tKey":"clqual","color":"#FFD908","indices":[1,2]},{"title":"Relegation","tKey":"relegation","color":"#FF4646","indices":[14,15]}],"ongoing":[],"tab
@jamtur01
jamtur01 / convert.py
Created July 1, 2022 18:02 — forked from mturilin/convert.py
Converst TextExpander csv to espanso yaml
#!/usr/bin/python3
import yaml
import sys
import csv
# create root yaml
matches = []
# open file
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

openpgp4fpr:A2C861F07924C92D698D5DDA6AFC66C2625EC8BB

@jamtur01
jamtur01 / gist:4384428
Created December 27, 2012 00:46
Java stack trace logstash regex
(^\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

Interviewing for Engineering roles


Workshop timetable

  • 15 mins Introduction

Per interview.

@jamtur01
jamtur01 / gist:9458261
Created March 10, 2014 02:03
Murmur launch
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