Skip to content

Instantly share code, notes, and snippets.

Avatar

David Blevins dblevins

View GitHub Profile
View get_color.sh
#!/bin/bash
STRING=$(echo -n "(request-target): get /signature-prototype-1.0-SNAPSHOT/api/colors/preferred
date: Tue, 07 Jun 2014 20:51:35 GMT" | base64)
SIGNATURE=$(
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)
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
*
View PerformaApiApplication.java
@ApplicationPath("api")
public class PerformaApiApplication extends Application {
@Override
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);