Skip to content

Instantly share code, notes, and snippets.

View folkengine's full-sized avatar
😈
Living in interesting times.

Christoph folkengine

😈
Living in interesting times.
View GitHub Profile
@folkengine
folkengine / powershell.tail.txt
Created September 23, 2011 13:46
tail in powershell
Get-Content .\FILENAME -Wait
@folkengine
folkengine / BuildConfig.groovy
Created October 3, 2011 18:31
Updating Apache Commons Validator to 1.4.0-SNAPSHOT in Grails
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
@folkengine
folkengine / gist:1337054
Created November 3, 2011 17:01
Default WebLogic Username/Password
Default WebLogic Username/Password
11: weblogic/weblogic
10: weblogic/welcome1
@folkengine
folkengine / mklinkjdk1.6.latest.bat
Created November 7, 2011 14:37
Create a symbolic link to jdk in Windows 7
IF NOT EXIST C:\opt\java\current\NUL GOTO NOWINDIR
rmdir C:\opt\java\current
:NOWINDIR
mklink /J C:\opt\java\current C:\opt\java\jdk1.6.0_26
@folkengine
folkengine / xmlslurp.groovy
Created November 14, 2011 21:26
Grails Reading in XML
package com.limited.ss.item
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
import grails.converters.*
class TestService implements ApplicationContextAware {
static transactional = false
@folkengine
folkengine / sql.distinct-count.example.sql
Created December 23, 2011 13:21
SQL count plus distinct
SELECT
DISTINCT thing1, (select count(B.thing1) from table1 B where A.thing1 = B.thing1) as mycount
FROM
table1 A
INNER JOIN
table2 E on A.table2s_id = e.table2_id
WHERE
( e.bool = 0 )
GROUP BY
A.thing1
@folkengine
folkengine / XMLExample.groovy
Created January 4, 2012 16:45
Grails XML Parsing By ID
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
class XMLExample implements ApplicationContextAware {
def applicationContext
/**
* <?xml version="1.0" encoding="UTF-8"?>
* <elementNames>
* <elementName id="UniqueIDInXMLFile" bar="baz" />
@folkengine
folkengine / mklinkjdk1.6.latest
Created January 4, 2012 20:00
Windows 7 Pseudo ln-s
IF NOT EXIST C:\opt\java\current\NUL GOTO NOWINDIR
rmdir C:\opt\java\current
:NOWINDIR
mklink /J C:\opt\java\current C:\opt\java\jdk1.6.0_26
@folkengine
folkengine / oracle.version.sql
Created January 9, 2012 16:37
What Version of Oracle
select * from v$version where banner like 'Oracle%';
@folkengine
folkengine / tomcat6-run-mojo.xml
Created February 16, 2012 16:30
embeds Tomcat into Maven
<plugin>
<!-- mvn tomcat6:run -->
<!-- http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/run-mojo-features.html Fixed version -->
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<!-- or if you want to use tomcat 6.x <artifactId>tomcat6-maven-plugin</artifactId> -->
<version>2.0-beta-1</version>
<configuration>
<!-- http port -->
<port>9180</port>