Skip to content

Instantly share code, notes, and snippets.

View geowarin's full-sized avatar

Geoffroy Warin geowarin

View GitHub Profile
@geowarin
geowarin / eclipse.ini
Last active June 14, 2018 17:08
My eclipse.ini JVM settings.
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Declipse.p2.unsignedPolicy=allow
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
# Number of method invocations/branches before compiling
#-XX:CompileThreshold=5
-XX:CompileThreshold=1500
-XX:MaxGCPauseMillis=10
@geowarin
geowarin / .bashrc
Created January 19, 2013 15:01
My default .bashrc file for cygwin
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
# Use case-insensitive filename globbing
shopt -s nocaseglob
# When changing directory small typos can be ignored by bash
# for example, cd /vr/lgo/apaache would find /var/log/apache
shopt -s cdspell
@geowarin
geowarin / persistence.xml
Created January 20, 2013 15:23
An example of persistence.xml with an embedded HSQDB.
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<persistence-unit name="persistence" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>com.geowarin.hibernate.jpa.standalone.model.User</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:standalone"/>
@geowarin
geowarin / test-data.xml
Created January 20, 2013 16:15
Simple dbUnit dataset
<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<USERS id="1" name="userTest" />
<USERS id="2" name="userTest2" />
</dataset>
@geowarin
geowarin / build-helper-snippet.xml
Created January 20, 2013 20:33
Here is an exemple of the use of the maven build helper plugin to include an arbitrary folder as a source folder. This approach is compatible with eclipse as long as you have m2e installed with the build-helper connector.
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.8.v20121106</version>
<configuration>
<scanIntervalSeconds>1</scanIntervalSeconds>
<!-- Context path is / by default -->
<!-- <webApp> -->
<!-- <contextPath>/${project.artifactId}</contextPath> -->
<!-- </webApp> -->
@geowarin
geowarin / tomcat7-maven-plugin-snippet.xml
Created January 22, 2013 04:03
Basic configuration for the tomcat7-maven plugin (http://tomcat.apache.org/maven-plugin-2.0)
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<!-- <path>/${project.artifactId}</path> -->
<path>/</path>
<port>8080</port>
</configuration>
</plugin>
@geowarin
geowarin / property-management-snippet.xml
Created January 23, 2013 18:29
maven : property-management. Here is how I manage my properties in a multi-module project with maven. See http://geowarin.wordpress.com/2013/01/23/a-proposition-for-managing-centralized-resources-with-maven
<build>
<resources>
<resource>
<directory>../modular-parent/dev-resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>../modular-parent/test-resources</directory>
</testResource>
@geowarin
geowarin / pom.xml
Created July 18, 2013 19:39
maven : basic-properties
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
@geowarin
geowarin / .gitignore
Last active December 20, 2015 14:28
.gitignore : general purpose gitignore file for maven projects #git #maven
# Intellij
.idea/
*.iml
*.iws
*.ipr
# Mac
.DS_Store
# Maven