Skip to content

Instantly share code, notes, and snippets.

@dylanscott
dylanscott / ocean.yml
Created January 13, 2016 22:49
Tweaked base16-ocean colors for iTerm 2
scheme: "Ocean"
author: "Chris Kempson (http://chriskempson.com)"
base00: "20242d"
base01: "272e36"
base02: "3e4954"
base03: "52606b"
base04: "969dac"
base05: "b3b8c3"
base06: "d7dae3"
base07: "ebedf3"
@dylanscott
dylanscott / gulpfile.js
Created August 15, 2016 15:35
gulp tsc --watch
const gulp = require('gulp')
const gutil = require('gulp-util')
const path = require('path')
const spawn = require('child_process').spawn
const split = require('split')
const prettyHrtime = require('pretty-hrtime')
const TSC_LINE = /\d{1,2}:\d{1,2}:\d{1,2} [AP]M - (.+)/
const TSC_ERROR = /(.+?: )(.+)/
gulp.task('watch:typescript', function(cb) {
@dylanscott
dylanscott / update_docker.sh
Last active March 12, 2024 08:36
Travis Update to Docker 1.13
#!/usr/bin/env bash
set -euo pipefail
sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" > /etc/apt/sources.list.d/docker.list'
curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -
sudo apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-get update
sudo apt-get -y install "docker-engine=1.13.1-0~ubuntu-$(lsb_release -cs)"
@dylanscott
dylanscott / lockfile.py
Created August 12, 2022 18:37
Canonicalize content order in poetry.lock [package.extras]
import tomlkit
import tomlkit.items
from pathlib import Path
def canonicalize_extras(entry):
canonicalized = {}
for key in sorted(entry.keys()):
canonicalized[key] = sorted(entry[key])
return canonicalized