This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# author: Clément Désiles | |
# date: 01/08/2016 | |
# source: https://gist.github.com/suma/8134207 | |
# source: http://stackoverflow.com/questions/34094792/autossh-pid-is-not-equal-to-the-one-in-pidfile-when-using-start-stop-daemon | |
### BEGIN INIT INFO | |
# Provides: autossh | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 1. Fill in your module name | |
# 2. Run the terraform state mv commands from the output | |
# Pipeline steps: | |
# Generate plan | |
# Remove ANSI colour codes | |
# Generate state mv commands | |
# Strip any moves of numbered instances of a resource (i.e. from using count) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(which ggrep || which grep) -oP '(^[a-z].+) ' | xargs -n 1 -I % sh -c 'echo % && heroku drains --app %;' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ggrep to use GNU grep (from brew install grep on OSX) | |
heroku apps | $(which ggrep || which grep) -oP '(^[a-z].+) ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Bakerloo": "#B36305", | |
"Central": "#E32017", | |
"Circle": "#FFD300", | |
"District": "#00782A", | |
"DLR": "#00A4A7", | |
"Hammersmith and City": "#F3A9BB", | |
"Jubilee": "#A0A5A9", | |
"Metropolitan": "#9B0056", | |
"Northern": "#000000", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import fileinput | |
import os.path as path | |
import re | |
class Processor(object): | |
def __init__(self): | |
self.condemnedFiles = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide Facebook 'Like' News | |
// @namespace uk.me.amoss | |
// @include /https?://www.facebook.com/.*/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// Configurable | |
var indicateInsteadOfHiding = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from icalendar import Calendar, Event | |
fp = open('basic.ics', 'r') | |
icalStr = "".join(line for line in fp) | |
fp.close() | |
cal = Calendar.from_ical(icalStr) | |
dates = [] | |
# Add start datetimes of events to list for sorting |