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
View gist:3131ecd193e3d3a5eb162da02c3bd079
# @jamiew PS1 customizations
# macOS edition
# bash/git completion are still in .bash_profile
# Calculate a dynamic hostname color... not really using this
#HOSTNAMECOLOR=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 30 + (total % 6)}')
# Export some useful color codes
if tput setaf 1 &> /dev/null; then
# set firmware password
# sudo firmwarepasswd -setpasswd -setmode command
# Disable the Character Accent Menu and Enable Key Repeat
defaults write -g ApplePressAndHoldEnabled -bool false
# Prevent generate .DS_Store
defaults write DSDontWriteNetworkStores -bool true
jamiew /
Last active Jan 29, 2020
Fetch node score from Helium API
# requires jq, for manipulating JSON:
# brew install jq
# find your hotspot's address here:
curl -s "$address" | jq '.data .score'
jamiew / git-friendly.rb
Created Dec 28, 2019
WIP git-friendly homebrew install
View git-friendly.rb
# /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/git-friendly.rb
# ```
# brew install --verbose --debug git-friendly
# brew audit --new-formula git-friendly
# brew test --verbose --debug git-friendly
# ```
class GitFriendly < Formula
desc "Streamline your git workflow: `pull`, `branch`, `merge`, `push`"
homepage ""
url ""
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 / 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"
You can’t perform that action at this time.