Skip to content

Instantly share code, notes, and snippets.

@UnquietCode
UnquietCode / RecyclingObjectPool.java
Created June 5, 2013 21:51
Object pool which reclaims resources not from the user but rather from the garbage collector.
package com.studyblue.utils.pool;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;
@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,