Skip to content

Instantly share code, notes, and snippets.

View tranminhan's full-sized avatar

Tran Minh An tranminhan

View GitHub Profile
@tranminhan
tranminhan / gist:1130408
Created August 7, 2011 14:21
Add Main-Class to manifest
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.someclass.Main</mainClass>
<packageName>com.someclass</packageName>
</manifest>
<manifestEntries>
@tranminhan
tranminhan / ExcelReading.java
Created May 25, 2011 15:43 — forked from Munawwar/ExcelReading.java
Java - Apache POI - Convert XLS/XLSX to CSV
/*
* Dependencies: Apache POI Library from http://poi.apache.org/
*/
package poi_excels;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
@tranminhan
tranminhan / gist:921258
Created April 15, 2011 06:35
maven error when not set Installed JRE to JDK Home in Eclipse
Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre6/../lib/tools.jar ->
@tranminhan
tranminhan / gist:919005
Created April 14, 2011 06:38
Tiles error without SLF4J implementation
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
@tranminhan
tranminhan / gist:918853
Created April 14, 2011 03:41
dependencies for Tiles 2.2
<!-- BEGIN dependencies for Tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.2.2</version>
@tranminhan
tranminhan / eclipse config to use JUL on Tomcat
Created April 12, 2011 16:20
webapp launch configuration to use java logging api when deployed on Tomcat from eclipse
-Dcatalina.base=%PATH_TO_TOMCAT_INSTALLATION%
-Dcatalina.home=%PATH_TO_TOMCAT_INSTALLATION%
-Djava.util.logging.config.file=%PATH_TO_TOMCAT_INSTALLATION%\conf\logging.properties"
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
@tranminhan
tranminhan / find files
Created April 11, 2011 19:48
find files
find *some_word_in_filename*
@tranminhan
tranminhan / remove non-empty dir
Created April 11, 2011 19:47
remove non-empty dir
rm -r dir_to_remove
@tranminhan
tranminhan / remove file or files
Created April 11, 2011 19:46
remove file or files
rm file.txt
rm *common_part_in_filenames*
@tranminhan
tranminhan / move file
Created April 11, 2011 19:45
move file
mv file.txt destination_dir