Skip to content

Instantly share code, notes, and snippets.

Avatar

Ross Timson rosstimson

View GitHub Profile
@rosstimson
rosstimson / local.remap-tilde.plist
Last active Mar 20, 2021
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
View 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 Jun 7, 2019
/etc/profile.d/flatpak.sh
View 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 Jul 26, 2019
Kubernetes Traefik and External DNS
View cheese.yml
# Deployments
# --------------------------------------------------------------------
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: stilton
namespace: dev
labels:
@rosstimson
rosstimson / .pre-commit-config.yaml
Last active Jun 18, 2018
pre-commit config for Terraform projects.
View .pre-commit-config.yaml
- 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 Dec 21, 2017
Docker Compose file for deploying an IOTA full node with IRI, Nelson, plus some monitoring tools.
View config.ini
[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 Dec 1, 2017
Scheduled Lambda that uses the Codeship API in order to trigger a build.
View codeship-ami-builder.py
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 Oct 10, 2017
Testing org-super-agenda
View emacs.el
;;; 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 Jan 30, 2016
Verifying myself on Keybase.io
View keybase.md

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 Oct 13, 2015
Easily get ffmpeg on Fedora with support for all the things.
View Dockerfile
# 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 <ross@rosstimson.com>
# 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 Jul 3, 2015
EC2 tag version of Bash installed.
View gist:ad2b79a78159bd80ffeb
#!/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