Skip to content

Instantly share code, notes, and snippets.

View hlship's full-sized avatar

Howard M. Lewis Ship hlship

View GitHub Profile
@hlship
hlship / Eliminate C3P0 System.err output
Created April 21, 2014 15:17
C3P0 tends to spit out some debugging information at startup. This offends me. I found a way to stop it.
;;; This is a hook for C3P0 to get rid of some garbage it logs to System.err on startup.
(let [err System/err]
(try
(System/setErr (PrintStream. (NullOutputStream.)))
(Class/forName "com.mchange.v2.c3p0.cfg.C3P0Config")
(finally
(System/setErr err))))
### Keybase proof
I hereby claim:
* I am hlship on github.
* I am hlship (https://keybase.io/hlship) on keybase.
* I have a public key whose fingerprint is 2640 6BB1 AA04 110E 49AA 8671 A820 90FF 7CC1 9136
To claim this, I am signing this object:
@hlship
hlship / build.gradle
Created February 20, 2014 16:28
Overriding transitive dependency versions
def versionOverrides = [
"asm:asm": "3.3.1",
"bultitude:bultitude": "0.1.7",
"commons-codec:commons-codec": "1.7",
"commons-io:commons-io": "2.4",
"io.aviso:pretty": "0.1.9-SNAPSHOT",
"joda-time:joda-time": "2.1",
"org.clojure:core.incubator": "0.1.1",
"org.clojure:tools.macro": "0.1.1",
"org.clojure:tools.namespace": "0.1.1",
description = "Demonstrate Gradle issue"
group = "io.aviso.novate"
version = "1.0.0-SNAPSHOT"
repositories {
maven {
name "annadale"
url "https://mvn.annadaletech.com/nexus/content/groups/public"
}
@hlship
hlship / gist:8583945
Created January 23, 2014 18:21
Build / deploy / download log
$ gradle publishToMavenLocal
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
<!--[if lte IE 9]>
<script type="text/javascript" src="/assets/ctx/z79f6b0bd/js/html5shiv.js"></script>
<script type="text/javascript" src="/assets/ctx/zf8f53e99/js/respond.js"></script>
<script type="text/javascript" src="/assets/ctx/z8aa0bee8/js/media.match.js"></script>
<![endif]-->
<t:conditionalcomment condition="lte IE 9">
<t:remove>
Fix IE8+9 lack of support for html5 elements and media queries
</t:remove>
<script src="${context:js/html5shiv.js}" type="text/javascript"/>
<script src="${context:js/respond.js}" type="text/javascript"/>
<script src="${context:js/media.match.js}" type="text/javascript"/>
</t:conditionalcomment>
ERROR [ qtp1025719152-24] io.aviso.twixt.coffee-script [ 1] - Handling asset request `/assets/invalid-coffeescript.coffee'.
ERROR [ qtp1025719152-24] io.aviso.twixt.coffee-script [ 2] - Compiling `META-INF/assets/invalid-coffeescript.coffee' to JavaScript
ERROR [ qtp1025719152-24] io.aviso.twixt.coffee-script META-INF/assets/invalid-coffeescript.coffee:6:1: error: unexpected INDENT
argument: dep2
^^^^^^
user=> (throw (make-exception))
SQLException Database failure
SELECT FOO, BAR, BAZ
FROM GNIP
failed with ABC123 user/jdbc-update (user.clj:6)
user=> (.printStackTrace *e)
java.lang.RuntimeException: Request handling exception
at user$make_exception.invoke(user.clj:30)
at user$eval1349.invoke(form-init6244416188680788244.clj:1)
(defn named-params
[& {:keys [foo bar]
:or {foo "foo-default" bar "bar-default"}}]
{:output-foo foo :output-bar bar})