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
jamiew / pimp_prompt.sh
Created Jan 21, 2011
put this in your .bashrc/.bash_profile... works with both git and svn
View pimp_prompt.sh
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
jamiew / tumblr-photo-ripper.rb
Created Jul 13, 2011
Download all the images from a Tumblr blog
View tumblr-photo-ripper.rb
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "doctorwho"
@jamiew
jamiew / google_twunter_lol
Created Jul 28, 2011
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
View google_twunter_lol
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@jamiew
jamiew / brew-sync.sh
Created Jan 8, 2016 — forked from witt3rd/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox (including casks)
View brew-sync.sh
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@jamiew
jamiew / mp4box_hacks.sh
Created Mar 7, 2013
Adding subtitles and audio tracks to an MP4 video with MP4Box
View mp4box_hacks.sh
# Add subtitle track
MP4Box -add minecraft_uncut.srt:lang=eng:layout=0x60x0x-1:group=2:hdlr="sbtl:tx3g" Minecraft2_mobile.mp4
# Add audio track
# 1. doesnt work in quicktime/itunes
MP4Box -add commentary_audio.aac Minecraft2_mobile.mp4
# 2. supposed to work in quicktime/itunes but doesn't seem to; :name at least is definitely not supported
MP4Box -add commentary_audio.aac:disable:group1:lang=en:name="Director's Commentary" Minecraft2_mobile.mp4
@jamiew
jamiew / uploading GML with uniqueKey.sh
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 uniqueKey.sh
gml="<gml><tag><header><client><uniqueKey>jamiew007</uniqueKey></client></header><drawing><stroke><pt><x>1</x><y>1</y><t>1</t></pt></stroke></drawing></tag></gml>"
id=$(curl -s -A curlwriter -d "application=curlwriter&gml=$gml" "https://000000book.com/data")
open "https://000book.com/data/$id"
@jamiew
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
jamiew / ipfs-daemon-remote.sh
Created Dec 4, 2018 — forked from Kubuxu/ipfs-daemon-remote.sh
Tunnel IPFS API via SSH
View ipfs-daemon-remote.sh
#!/usr/bin/env bash
REMOTE_HOST=${1-"YOUR REMOTE HOST HERE"}
DEFAULT_API_FILE="$HOME/.ipfs/api"
API_FILE="${IPFS_PATH-$DEFAULT_API_FILE}"
if [ -e "$API_FILE" ]; then
echo "IPFS API is already running"
exit 1
fi
@jamiew
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 :: http://github.com/jamiew
application = "000000book.com"
environment = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'production'
app_path = "/srv/#{application}"
bundle_path = "#{app_path}/shared/bundle"
timeout 30
View blockstack proof
Verifying my Blockstack ID is secured with the address 18h4uecwF3XXHJFKJufUkkNPaoHTeJKZZ2 https://explorer.blockstack.org/address/18h4uecwF3XXHJFKJufUkkNPaoHTeJKZZ2
You can’t perform that action at this time.