Skip to content

Instantly share code, notes, and snippets.

View paul-hammant's full-sized avatar

Paul Hammant paul-hammant

View GitHub Profile
## For use with https://addons.mozilla.org/en-US/firefox/addon/212/
## If named to match title of page, this extracts zipped contents for source control usage
## inspired by {{{ http://code.activestate.com/recipes/465649/ (r3)
##
import os, zipfile, sys, subprocess, platform
from cStringIO import StringIO
def extract( filename, dir ):
zfn = filename + '.maff'
print 'Processing: ' + zfn
@paul-hammant
paul-hammant / gist:4725420
Created February 6, 2013 20:17
my svn homebrew problem
PH7785:to_delete paul$ brew update
Already up-to-date.
PH7785:to_delete paul$ brew upgrade
PH7785:to_delete paul$ brew update
Already up-to-date.
PH7785:to_delete paul$ brew rm sqlite svn
Uninstalling /usr/local/Cellar/sqlite/3.7.15.1...
Uninstalling /usr/local/Cellar/subversion/1.7.8...
@paul-hammant
paul-hammant / LICENSE
Created August 11, 2016 03:13 — forked from kerryrodden/.block
Sequences sunburst
Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@paul-hammant
paul-hammant / svn_speed_test.sh
Created November 13, 2016 11:03
Use this to work out that your subversion install is going to under perform (unknown combinations of OS/deps/CPU/RAM/drive)
#!/bin/bash
typ="$1"
if [ "$typ" == "" ]; then
typ="fsfs"
fi
if [ "$typ" != "fsfs" ] && [ "$typ" != "fsx" ]; then
echo "Usage: svn_speed_test.sh fsx|fsfs"
exit 10
fi
@paul-hammant
paul-hammant / doit.py
Last active May 14, 2017 16:29
Git as part of Maven Central?
# pip3 install sh
from sh import wget, unzip, mkdir, cd, git, touch, rm, du
root = "http://central.maven.org/maven2/"
def doGAV(url, v, suffix):
op = wget("-qO-", root + url + "/" + v + "/index.html")
for line in op.splitlines():
if v + suffix + ".jar\"" in line:
{
"builds": [{
"ref": "114",
"steps": [{
"name": "c",
"dur": 800,
"status": "passed"
}, {
"name": "u",
"dur": 42600,
#!/usr/bin/env python
#
# svnviewspec_tests.py: testing the 'svn-viewspec.py' tool.
#
# Subversion is a tool for revision control.
# See http://subversion.apache.org for more information.
#
# ====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
diff --git a/_posts/2017-09-17-merkle-trees-in-pictures.md b/_posts/2017-09-17-merkle-trees-in-pictures.md
index e2bfd942..a7334f7f 100644
--- a/_posts/2017-09-17-merkle-trees-in-pictures.md
+++ b/_posts/2017-09-17-merkle-trees-in-pictures.md
@@ -107,9 +107,7 @@ I'll try for that (SVG inline):
<line x1="784" y1="-111.77759" x2="784" y2="-139.32304" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<line x1="600.0604" y1="-184.41212" x2="600.0604" y2="-139.93516" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<text transform="translate(222 20.87373)" fill="black">
- <tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="0" y="15" textLength="74.384">A Merke tr</tspan>
- <tspan font-family="Helvetica Neue" font-size="16" font-weight="500" x="74.096" y="15" textLength="45.04">ee at r</tspan>
@paul-hammant
paul-hammant / certbot-renew.sh
Created October 10, 2017 23:21 — forked from printminion/certbot-renew.sh
renew ssl letsencrypt certificate on bitnami server
#!/bin/bash
#renew ssl letsencrypt certificate on bitnami server
#https://gist.github.com/printminion/6ec2fc0fefaba8e0a98a63a6d73b0802/edit
sudo /opt/bitnami/ctlscript.sh stop apache
cd /home/user/certbot
#./certbot-auto certonly --standalone -w /opt/bitnami/apache2/conf/ -d example
.com -d www.example.com
./certbot-auto renew
sudo cp /etc/letsencrypt/live/example.com/fullchain.pem /opt/bitnami/apache2/conf/server.crt
<html>
<body>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="139 -165 728 472" width="728pt" height="472pt" xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata> Produced by OmniGraffle 7.5
<dc:date>2017-12-17 12:55:15 +0000</dc:date>
</metadata>
<defs>
<font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="500">
<font-face-src>
<font-face-name name="HelveticaNeue"/>