Skip to content

Instantly share code, notes, and snippets.

@joemccall86
joemccall86 / GMESignedHTTPBuilder.groovy
Created November 14, 2013 00:37
Google Maps API for Business HTTPBuilder. Based on https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures Due to the way signing works, it's insufficient to simply add a signature query parameter to the `uri.query` map since it must be appended at the end, and it must be unmodified by url encoding. This int…
import groovyx.net.http.HTTPBuilder
import groovyx.net.http.URIBuilder
import org.apache.http.client.ClientProtocolException
import org.springframework.beans.factory.InitializingBean
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
/**
* Created by Joe on 11/13/13.
@Entity
public Department {
@Id String name;
Long latitude;
Long longidude;
@ManyToOne
Set<Officer> officers;
}
@joemccall86
joemccall86 / gist:5799823
Created June 17, 2013 20:00
SiteMesh 403 Error
com.opensymphony.module.sitemesh.factory.FactoryException: Cannot construct Factory : com.opensymphony.module.sitemesh.factory.DefaultFactory: com.opensymphony.module.sitemesh.factory.FactoryException: Could not read config file : /WEB-INF/sitemesh.xml: java.io.IOException: Server returned HTTP response code: 403 for URL: http://opensymphony.com/sitemesh/dtd/sitemesh_1_5_decorators.dtd
configurations {
warUnderlay
pomWorkarounds
}
repositories {
mavenCentral()
}
ext {
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd ">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.university.cas</groupId>
<artifactId>local-cas</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
@joemccall86
joemccall86 / PKGBUILD
Created May 1, 2013 08:35
Modified PKGBUILD for spring-tool-suite 3.2.0
# Maintainer: Marcin
pkgname=spring-tool-suite
pkgver=3.2.0
_eclipse_pkgver=e4.2.2
_eclipse_pkgver_short=e4.2
pkgrel=1
pkgdesc="Spring Tool Suite (STS from SpringSource)"
arch=('i686' 'x86_64')
url="http://www.springsource.com/developer/sts"
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'net.sf.ehcache:ehcache:2.7.0'
}
@joemccall86
joemccall86 / gist:4630173
Created January 25, 2013 00:23
DDL generated by hibernate JPA when generateDdl=true
Column | Type | Modifiers
--------+--------+-----------
text | text |
id | bigint | not null