Skip to content

Instantly share code, notes, and snippets.

@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
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'net.sf.ehcache:ehcache:2.7.0'
}
@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"
<?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>
configurations {
warUnderlay
pomWorkarounds
}
repositories {
mavenCentral()
}
ext {
@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
@Entity
public Department {
@Id String name;
Long latitude;
Long longidude;
@ManyToOne
Set<Officer> officers;
}
@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.
@joemccall86
joemccall86 / gist:9943666
Created April 2, 2014 21:35
Stacktrace for failed grails unit test
| Loading Grails 2.2.4
| Configuring classpath
| Configuring classpath.
| Environment set to test
| Environment set to test.
| Environment set to test..
| Environment set to test...
| Environment set to test....
| Environment set to test.....
| Compiling 1 source files
@joemccall86
joemccall86 / Caddyfile
Last active March 6, 2016 14:23 — forked from edrex/Caddyfile
localhost
log access.log
proxy /echo 127.0.0.1:8080 {
websocket
# treat the path as if it were sent without the /echo
without /echo
}