Skip to content

Instantly share code, notes, and snippets.

View rosstimson's full-sized avatar

Ross Timson rosstimson

View GitHub Profile
@rosstimson
rosstimson / local.remap-tilde.plist
Last active March 20, 2021 15:42
Remap tilde key to top left on a UK MacBook rather than bottom left. Place in: ~/Library/LaunchAgents/local.remap-tilde.plist and run: launchctl load ~/Library/LaunchAgents/local.remap-tilde.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.remap-tilde</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
@rosstimson
rosstimson / flatpak.sh
Created June 7, 2019 18:35
/etc/profile.d/flatpak.sh
if command -v flatpak > /dev/null; then
# set XDG_DATA_DIRS to include Flatpak installations
new_dirs=$(
(
unset G_MESSAGES_DEBUG
echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak"
flatpak --installations
) | (
new_dirs=
@rosstimson
rosstimson / cheese.yml
Last active July 26, 2019 09:11
Kubernetes Traefik and External DNS
# Deployments
# --------------------------------------------------------------------
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: stilton
namespace: dev
labels:
@rosstimson
rosstimson / .pre-commit-config.yaml
Last active June 18, 2018 09:38
pre-commit config for Terraform projects.
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: detect-aws-credentials
- id: detect-private-key
@rosstimson
rosstimson / config.ini
Last active December 21, 2017 16:52
Docker Compose file for deploying an IOTA full node with IRI, Nelson, plus some monitoring tools.
[nelson]
cycleInterval = 60
epochInterval = 300
apiPort = 18600
apiHostname = 127.0.0.1
port = 16600
IRIHostname = iri
IRIPort = 14265
TCPPort = 15777
UDPPort = 14777
@rosstimson
rosstimson / codeship-ami-builder.py
Created December 1, 2017 16:19
Scheduled Lambda that uses the Codeship API in order to trigger a build.
import boto3
import http.client
import json
import logging
import os
from base64 import b64decode
conn = http.client.HTTPSConnection("api.codeship.com")
payload = "{}"
@rosstimson
rosstimson / emacs.el
Created October 10, 2017 19:27
Testing org-super-agenda
;;; Package Management
;; Always load newest byte code
(setq load-prefer-newer t)
(require 'package)
(setq package-enable-at-startup nil)
;; Standard package repositories
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
@rosstimson
rosstimson / keybase.md
Created January 30, 2016 16:23
Verifying myself on Keybase.io

Keybase proof

I hereby claim:

  • I am rosstimson on github.
  • I am rosstimson (https://keybase.io/rosstimson) on keybase.
  • I have a public key ASD-XW_rG0Lu8LszbjLMXb_XBxHTEjuJHldI52u44hte3wo

To claim this, I am signing this object:

@rosstimson
rosstimson / Dockerfile
Created October 13, 2015 20:37
Easily get ffmpeg on Fedora with support for all the things.
# Dockerfile for ffmpeg with pretty much support for everything as per:
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# includes codecs with weird licensing like MP3 and AAC.
#
FROM fedora
MAINTAINER Ross Timson <[email protected]>
# Install build requirements.
RUN dnf install -y autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
@rosstimson
rosstimson / gist:ad2b79a78159bd80ffeb
Created July 3, 2015 09:01
EC2 tag version of Bash installed.
#!/usr/bin/env bash
EC2_INSTANCE_ID="`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id`"
EC2_REGION="`wget -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/.$//g'`"
if ! type "aws" > /dev/null; then
if ! type "pip" > /dev/null; then
easy_install pip
fi
pip install awscli