Skip to content

Instantly share code, notes, and snippets.


Jamie Dubs jamiew

View GitHub Profile
jamiew /
Created January 8, 2016 17:14 — forked from witt3rd/
Sync Homebrew installations between Macs via Dropbox (including casks)
# Sync Homebrew installations between Macs via Dropbox
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
jamiew /
Created December 7, 2019 16:01
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"
jamiew / ipfs-main.json
Last active August 12, 2022 04:52 — 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 / Munin Passenger Phusion Memory Stats.rb
Created October 31, 2008 18:55
munin plugin to monitor Passenger Phusion memory stats
View Munin Passenger Phusion Memory Stats.rb
#!/usr/bin/env ruby
# put in /etc/munin/plugins and restart munin-node
# by Dan Manges,
# NOTE: you might need to add munin to allow passwordless sudo for passenger-memory-stats
def output_config
puts <<-END
graph_category App
graph_title Passenger memory stats
graph_vlabel count
View pagerank.rb
#!/usr/bin/env ruby
# quick Google PageRank lookup
# usage: ~/bin/pagerank
# => 6
# by Vsevolod S. Balashov <vsevolod @>
# hacks/binify by Jamie Dubs <>
# based on 3rd party code snippets (see comments)
# TODO: make into a gem... the existing googlePR one is broken!
jamiew / snapshot.rb
Created April 29, 2022 15:26 — forked from dougpfeffer/snapshot.rb
NFT Collection Snapshot Generate with Moralis
View snapshot.rb
# Requires a Moralis API key.
# Writes out lists of owners of each token of each contract listed in the `CONTRACTS` array.
# Doesn't work on OpenSea contracts.
require 'net/http'
require 'uri'
require 'json'
jamiew / google_twunter_lol
Created July 28, 2011 20:34
All the dirty words from Google's "what do you love" project:
View google_twunter_lol
View HIP grooming report
View gist:f4634c7a2709ac02c79e2d80eda45f89
# @jamiew 2020-01-27
# Generate a Wu-Tang name using the "official" name generator
# (AKA the Childish Gambino Wu-Tang Name Generator)
# TODO output a more username-friendly format - no spaces or special chars
# This script depends on `curl`, `td` and `pup`
# Some clever regex could eliminate the need for pup
jamiew /
Created January 21, 2011 17:55
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)"