Skip to content

Instantly share code, notes, and snippets.


David Blevins dblevins

View GitHub Profile
STRING=$(echo -n "(request-target): get /signature-prototype-1.0-SNAPSHOT/api/colors/preferred
date: Tue, 07 Jun 2014 20:51:35 GMT" | base64)
echo -n "(request-target): get /signature-prototype-1.0-SNAPSHOT/api/colors/preferred
date: Tue, 07 Jun 2014 20:51:35 GMT" | openssl dgst -binary -sha256 -hmac "PennyLunaLuka" | base64)
dblevins /
Created June 27, 2012 17:00
JAX-RS ServiceLoader - JS
public class PerformaApiApplication extends Application {
public Set<Class<?>> getClasses() {
final ClassLoader loader = this.getClass().getClassLoader();
final Set<Class<?>> services = new HashSet<Class<?>>();
for (String className : readClasses()) {
try {
final Class<?> clazz = loader.loadClass(className);
View gist:302775
package localdomain.localhost;
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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