Skip to content

Instantly share code, notes, and snippets.

Jamie Wilkinson jamiew

View GitHub Profile
@jamiew
jamiew / .gitconfig
Last active Jun 15, 2020
public pieces of my .gitconfig
View .gitconfig
[user]
name = Jamie Dubs
email = noreply@example.com
[apply]
whitespace = fix
[branch]
autosetuprebase = always
autosetupmerge = always
[color]
branch = auto
View gist:74c6c4f5dbc93bb20fe2d5ef94a9b3c6
"No location requirements."
"Boston, SF, NY, Baltimore"
"United States"
"Newport Beach CA"
"San Francisco, Palo Alto, Stanford, Los Angeles, San Diego"
"Planet Earth (founder in Vancouver, BC)"
"California, New York"
"San Francisco"
"N/A"
"Just start uploading designs and software to the community"
View vimeo-master.json
{
"clip_id": "86a5d28c-22a1-4ad5-852e-169a3b195e9e",
"base_url": "../",
"video": [
{
"id": "4ca6366e",
"base_url": "4ca6366e/chop/",
"format": "mp42",
"mime_type": "video/mp4",
"codecs": "avc1.640028",
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 HOSTNAMECOLOR
# Export some useful color codes
if tput setaf 1 &> /dev/null; then
View mac_installation.sh
#!/bin/bash
# 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 com.apple.desktopservices DSDontWriteNetworkStores -bool true
@jamiew
jamiew / helium-score.sh
Last active Jan 29, 2020
Fetch node score from Helium API
View helium-score.sh
#!/bin/sh
# requires jq, for manipulating JSON:
# brew install jq
#
# find your hotspot's address here:
# https://explorer.helium.foundation/api/hotspots/
address="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
curl -s "https://explorer.helium.foundation/api/hotspots/$address" | jq '.data .score'
@jamiew
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 "https://github.com/jamiew/git-friendly"
url "https://github.com/jamiew/git-friendly/archive/1.0.tar.gz"
@jamiew
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
jamiew / plex-scan.sh
Created Dec 7, 2019
WIP script to intelligently upate my Plex library after sabnzbd downloads are done
View plex-scan.sh
#!/bin/bash
# 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"
done
View simple read-write disk benchmarks.sh
# 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;
You can’t perform that action at this time.