Skip to content

Instantly share code, notes, and snippets.

Jamie Wilkinson jamiew

Block or report user

Report or block jamiew

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jamiew / ._example output
Last active Dec 19, 2019
How I debugged my slow bash startup
View ._example output
# Start a new shell
... startup: 31
... git-completion: 113
... git-prompt: 41
... exports: 47
... rbenv: 216
... other scripts: 41
jamiew /
Created Dec 7, 2019
WIP script to intelligently upate my Plex library after sabnzbd downloads are done
# sabnzbd post-download notification script for Plex
# Define $PLEX_TOKEN in your environment
# Debug arguments to sab
echo "Args:"
for word in "$@"; do
echo "$word"
View simple read-write disk
# on debian-based linux
# run as root so drop_caches works
for i in /home/jamie /mnt/duo /mnt/data3; do
echo $i
echo "writes: "
dd if=/dev/zero of=$i/tempfile bs=1M count=1024 conv=fdatasync,notrunc status=progress 2>&1 | grep copied
echo "dropping caches..."
echo 3 > /proc/sys/vm/drop_caches
echo "reads: "
dd if=$i/tempfile of=/dev/null bs=1M count=1024 status=progress 2>&1 | grep copied;
jamiew / cloudflare-callback-example.html
Created Oct 16, 2019
Need javascript callbacks from Cloudflare in order to intelligently autoplay-mute
View cloudflare-callback-example.html
<meta charset="UTF-8">
<title>Cloudflare player javascript test</title>
<script type="text/javascript">
function loadVideo(){
const videoId = "5d5bc37ffcf54c9b82e996823bffbb81";
let player = document.getElementById('video-player');
player.innerHTML = `<stream src="${videoId}" controls="" preload=""></stream>`;
jamiew / balsn-warmup.php
Created Oct 8, 2019
basln-ctf warmup.php
View balsn-warmup.php
( ($_=@$_GET['Σ>―(#°ω°#)♡→'])
jamiew /
Created Jan 21, 2011
put this in your .bashrc/.bash_profile... works with both git and svn
parse_git_branch() {
ref=$(git symbolic-ref -q HEAD 2> /dev/null) || return
printf "${1:-(%s)}" "${ref#refs/heads/}"
parse_svn_revision() {
local DIRTY REV=$(svn info 2>/dev/null | grep Revision | sed -e 's/Revision: //')
[ "$REV" ] || return
[ "$(svn st)" ] && DIRTY=' *'
echo "(r$REV$DIRTY)"
jamiew / uploading GML with
Created Feb 19, 2019
you can't specify uniqueKey as a URL parameter, it has to be inside the actual GML data
View uploading GML with
id=$(curl -s -A curlwriter -d "application=curlwriter&gml=$gml" "")
open "$id"
jamiew / ipfs-main.json
Last active Jan 10, 2019 — forked from eefahy/ipfs-main.json
Grafana dashboard configuration for the IPFS Prometheus endpoint
View ipfs-main.json
"annotations": {
"list": [
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
jamiew /
Created Dec 4, 2018 — forked from Kubuxu/
Tunnel IPFS API via SSH
#!/usr/bin/env bash
if [ -e "$API_FILE" ]; then
echo "IPFS API is already running"
exit 1
jamiew / unicorn.rb
Created Oct 14, 2010 — forked from jimmysoho/gist:534668
Unicorn config for use with bundler and capistrano - fixes issues with environment pollution.rb
View unicorn.rb
# My pimped out unicorn config, with incremental killof
# and all the latest capistrano & bundler-proofing
# @jamiew ::
application = ""
environment = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'production'
app_path = "/srv/#{application}"
bundle_path = "#{app_path}/shared/bundle"
timeout 30
You can’t perform that action at this time.