Skip to content

Instantly share code, notes, and snippets.


Benjamin Fagin UnquietCode

View GitHub Profile

Keybase proof

I hereby claim:

  • I am unquietcode on github.
  • I am unquietcode ( on keybase.
  • I have a public key ASDL4ha8bU25uQvATXGnhAGcrJKFfk_Khbcbs9QUZLCEbgo

To claim this, I am signing this object:

UnquietCode /
Last active Jan 22, 2019
sum github issue labels

Bookmarklet Usage

  1. copy the bookmarklet code below
  2. create a new bookmark with the code as the URL
  3. navigate to an issues listing view in GitHub, like a milestone view
  4. click the bookmark, an alert box will show you the results

Script Usage

  1. navigate to an issues listing view in GitHub, like a milestone view
  2. copy the code snippet
  3. open the browsers JavaScript developer console on the page
UnquietCode /
Created Aug 16, 2017
generate AWS SES email credentials in Python
# based on:
import hashlib
import hmac
import base64
key = bytes('aws-secret-access-key').encode('utf-8')
message = bytes('SendRawEmail').encode('utf-8')
UnquietCode / Lava Lamp
Created Apr 19, 2015
Lava Lamp Random Number Generator
View Lava Lamp

Lava Lamp Random Number Generator

(extracted from the now defunct SGI project at via the magical Internet Archive Wayback Machine)

Lava Lamps can be used as a source of randomness, which can be used to establish a random number generator. The output of the RNG can then be consumed by various computer applications.

Step 1: Establish a chaotic system

(Set up Lava Lite® lamps in a machine room.)

UnquietCode /
Last active Jul 25, 2017
Merge two or more JSON objects in JavaScript (CoffeeScript).
valueOrCopy = (obj) ->
if not obj
return undefined
else if obj instanceof Array
newObj = []
newObj.push(x) for x in obj
return newObj
else if (typeof obj).toLowerCase() is 'object'
UnquietCode / A.js
Last active Aug 29, 2015
gulp-browatchify test
View A.js
var B = require('./B');
UnquietCode /
Last active Apr 8, 2019
Jackson module which can instantiate interface types using a proxy.
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.deser.Deserializers;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.util.Iterator;
View gist:7596282
name: "Object"
version: "1"
parents: []
properties: {
name: "string"
version: "string"
parents: "string*"
properties: "object"
UnquietCode /
Created Nov 14, 2013
Keep track of your API in your code. This also allows you to easily identify places in your application where legacy blocks ('hacks') can be removed.
public enum API {
@Deprecated Version1,
UnquietCode /
Created Aug 23, 2013
Custom implementation of Spring's RequestMappingHandlerMapping which automatically registers a redirect for the same url with (or without) a trailing slash. This is good in cases where for SEO purposes you want 'url' and 'url/' to resolve to the same page.
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition;
import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.view.RedirectView;