Skip to content

Instantly share code, notes, and snippets.

View Bombe's full-sized avatar

David Roden Bombe

View GitHub Profile
diff --git a/README.building.md b/README.building.md
index c259e48..da274e2 100644
--- a/README.building.md
+++ b/README.building.md
@@ -2,7 +2,7 @@
Install junit 3 and Apache ant. For Debian Wheezy these are `junit` and `ant`.
-* `lib/bcprov.jar`: Download Bouncy Castle 1.49: `wget --no-passive-ftp ftp://ftp.bouncycastle.org/pub/release1.49/bcprov-jdk15on-149.jar` (1.50 breaks something currently)
+* `lib/bcprov.jar`: Download Bouncy Castle 1.49 (1.50 breaks something currently): `wget --no-passive-ftp ftp://ftp.bouncycastle.org/pub/release1.49/bcprov-jdk15on-149.jar` or `wget http://www.bouncycastle.org/download/bcprov-jdk15on-149.jar`
package plugins.WebOfTrust.identicon.face;
import static java.awt.BorderLayout.CENTER;
import static javax.swing.JFrame.EXIT_ON_CLOSE;
import static plugins.WebOfTrust.identicon.face.Face.createFace;
import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.MouseAdapter;
@Bombe
Bombe / gist:4c65f2bae4b08eeccfc9
Created September 23, 2014 06:59
keybase signature
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
owF1kn1MVWUcxy9QWSSBbpqiIRx1zoTLeXvOcw4xi5XOEmyBvFl0eZ5znsM9CPdc
z72AaBTWnFji+9gIFhqRLkAHaMxiAabtKllTXm6UEBsN0NBQsRWWt3MZLWvr+et5
+fy+z/f7e579IUGWwIClO4KKllsnzwZ0XcOWjVHhq7ZTWFeKqbjtlJynEYfbP3Og
fELFUZtJMUYuYtX0SIeuEGuuK3KGiaYKieHSdIdJ0VZopamSaD/uL1Y1Rw4xnIbm
16IEVkGEESBSVQ4hHqiSyECGo1lOZGgOQhawROVl1pS06y73v26lpjVtmmLuPsCv
Wcs/7+cLpg+QJEOGEXgRYB4qKo2BqGAECEGyRDBN+0EXMWYiYT0fE7/ZfGJsziM2
Q9enE8tuzX/O8AzDAwBoaNpBLrtZQUzngiLSsoghrSKJgSqLJJVmBBWzCgcYGSIB
@Bombe
Bombe / make-12x12.sh
Last active August 29, 2015 14:10
Create pixelated versions of any number of album covers
#!/bin/bash
# GUID:370EBDBF-00CF-4D6D-9772-4A2B941A016F
PIXELS="12"
TARGET_WIDTH="900"
BORDER_WIDTH="50"
TEMP="temp"
OUTPUT_FILE="12x12.png"
IMAGES=()
@Bombe
Bombe / GenerateVanityKey.java
Last active October 25, 2016 12:15
Use the power of threads!
/**
* GenerateVanityKey.java – generates keypairs with a prefix
* Copyright © 2014 David ‘Bombe’ Roden
* <p>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
@Bombe
Bombe / set-language-level.patch
Created February 8, 2015 12:10
Patch for the retired Maven IDEA plugin (version 2.2.1) to allow setting the language level in the IDEA configuration file.
Index: src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java
===================================================================
--- src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java (revision 1658114)
+++ src/main/java/org/apache/maven/plugin/idea/IdeaProjectMojo.java (working copy)
@@ -161,6 +161,11 @@
setJdkName( module, defaultJdkName );
}
+ if ( jdkLevel != null )
+ {
@Bombe
Bombe / insert-file
Created February 15, 2015 00:52
bash script to insert a file into Freenet (using FCP) (works on OS X)
#!/bin/bash
#
# GUID:F9FC4F74-501A-46BC-B57E-F9D8B4EFB83E
function client_hello() {
echo "ClientHello"
echo "Name=${1}"
echo "ExpectedVersion=2.0"
echo "EndMessage"
}
package de.xplosion.adp.servlet.filter;
import javax.inject.Inject;
import javax.inject.Singleton;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
@Bombe
Bombe / .days
Last active March 31, 2016 11:17
days-left
20170414120000 Revision 2017 (for Visitors)
20160701120000 Nordlicht 2016
20160812120000 Evoke 2016
@Bombe
Bombe / decide
Created November 16, 2017 13:47
Makes a decision between a number of given options.
#!/bin/bash
# 64D16CF7-35CB-4E1D-83E4-504260998EC4
numberOfChoices="${#@}"
if [ "${numberOfChoices}" == "0" ]; then
r="$((${RANDOM} % 2))"
if [ "${r}" == "0" ]; then
echo "No."
else