Skip to content

Instantly share code, notes, and snippets.



  • Singapore
View GitHub Profile
superfawkes / gmailautocleanup.js
Last active Aug 7, 2019
Gmail Inbox maintenance - automatically cleans up older email notifications that have only a transient use - either by sender or by filter-folder
View gmailautocleanup.js
// adapted from idea in
function EmailIdFromMailer(mailer)
var start = mailer.indexOf('<');
var end = mailer.indexOf('>');
if (start > -1 && end > -1)
return mailer.substring(start+1,end);
superfawkes /
Created May 2, 2018
Utility script to download BBC's non-commercial sound effects library
#!/usr/bin/env python
""" BBC Sound Effects scraper script: Copyright 2018 Shrinivas Ramani
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
superfawkes /
Created Jun 30, 2017
Interactive Git Stash utility
#!/bin/bash -f
function RecalcStashes {
PS3="`git stash list | wc -l` stashes present. Enter Option > "
function List {
if [[ $1 -eq 2 ]]; then
git stash list --pretty=format:"%C(red)%h%C(reset) - %C(green)(%cr) %C(bold blue)<%an>%C(reset) off %C(red)%p: %+s"
superfawkes /
Created Jun 22, 2016
Git Diff to Svn Diff - compatible with Crucible andCode Review software
# git-svn-diff originally by (
# modified by
# modified by aconway@[redacted] - handle diffs that introduce new files
# modified by superfawkes - correct whitespaces in aconway's patch for Crucible, handle whitespaces for BSD/OSX styled sed
# Generate an SVN-compatible diff against the tip of the tracking branch
# Get the tracking branch (if we're on a branch)
superfawkes / .bashrc
Created Apr 23, 2014
Useful bash settings for the OS X Terminal
View .bashrc
# sets the terminal tab-name
function tabname {
printf "\e]1;$1\a"
# some git-stash-like goodies for svn
function shelf {
if [[ $# -lt 2 ]]; then
echo "Usage: $0 <patch-file-path> <files>"
You can’t perform that action at this time.