Skip to content

Instantly share code, notes, and snippets.

this is a test
an update to this file
@berinle
berinle / gist:4259802
Created December 11, 2012 16:10
gvm still not happy with zsh
berinle@bayo-macbook : ~
[0] % gvm
berinle@bayo-macbook : ~
[0] % bash
bash-3.2$ gvm
Usage: gvm <command> <candidate> [version]
command : install, uninstall, list, use, current, version, default, selfupdate, broadcast or help
@berinle
berinle / BuildConfig.groovy
Created December 8, 2012 18:48
using grails custom ivy resolver
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
def libResolver = new org.apache.ivy.plugins.resolver.URLResolver()
@berinle
berinle / gist:4236052
Created December 7, 2012 19:59
install jar in maven
libs mvn install:install-file -Dfile=army-fleet-1.0-SNAPSHOT.jar -DgroupId=com.armyfleet -DartifactId=fleet -Dversion=1.0-SNAPSHOT -Dpackaging=jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
[INFO] Installing C:\tmp\army-fleet\build\libs\army-fleet-1.0-SNAPSHOT.jar to C:\Users\berinle\.m2\repository\com\armyfleet\fleet\1.0-SNAPSHOT\fleet-1.0-SNAPSHOT.jar
[INFO] Installing C:\Users\berinle\AppData\Local\Temp\mvninstall1365836677560122908.pom to C:\Users\berinle\.m2\repository\com\armyfleet\fleet\1.0-SNAPSHOT\fleet-1.0-SNAPSHOT.pom
@berinle
berinle / gist:3048073
Created July 4, 2012 16:07
Grails error
2012-07-04 12:04:33,544 ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/spring-social-showcase].[gsp]:271 Servlet.service() for servlet [gsp] in context with path [/spring-social-showcase] threw exception
java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131)
at org.codehaus.groovy.grails.web.util.WebUtils.retrieveGrailsWebRequest(WebUtils.java:651)
at org.codehaus.groovy.grails.plugins.springsecurity.AnnotationFilterInvocationDefinition.determineUrl(AnnotationFilterIn
@berinle
berinle / gist:2815968
Created May 27, 2012 21:30
git aliases
## custom aliases
alias gll="git log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'"
alias glol="git log --pretty=oneline --abbrev-commit --graph --decorate"
alias s="git status --short"
alias d="git diff"
alias gup="git smart-pull"
alias gm="git smart-merge"
alias gsl="git smart-log"
@berinle
berinle / gist:1760796
Created February 7, 2012 17:16
Git tips: creating and applying a patch avoiding white space issues
#create a commit patch, ignoring all white space issues
g format-patch -w -b --ignore-space-at-eol -o /my/patch/destination -1
#apply a patch, ignoring all white space issues
g am --ignore-space-change --ignore-whitespace --whitespace=nowarn
@berinle
berinle / gist:1588037
Created January 10, 2012 09:21
ehcache (disk overflow turned off)
"Thread-3" prio=6 tid=0x04858c00 nid=0x19bc waiting on condition [0x081cf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x15fe9cd0> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)
at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:807)
at net.sf.ehcache.store.chm.SelectableConcurrentHashMap$MemoryStoreSegment.remove(SelectableConcurrentHashMap.java:370)
@berinle
berinle / gist:1587991
Created January 10, 2012 09:09
ehcache warnings
03:50:52,314 WARN [net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator] Unable to send message to remote peer. Message was: java.io.EOFException
net.sf.ehcache.CacheException: java.io.EOFException
at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:938)
at net.sf.ehcache.store.disk.Segment.decode(Segment.java:167)
at net.sf.ehcache.store.disk.Segment.put(Segment.java:444)
at net.sf.ehcache.store.disk.DiskStore.put(DiskStore.java:475)
at net.sf.ehcache.store.FrontEndCacheTier.put(FrontEndCacheTier.java:221)
at net.sf.ehcache.Cache.putInternal(Cache.java:1492)
at net.sf.ehcache.Cache.put(Cache.java:1417)
at net.sf.ehcache.distribution.RMICachePeer.put(RMICachePeer.java:177)
@berinle
berinle / gist:1561991
Created January 4, 2012 20:33
GeDA flattened transformation (limitation)
class A {
String name;
List<B> bees;
}
class B {
String name;
Integer foo;
}