Bed-bugs-300x296

This is my cheat sheet I use whenever I had to debug a Java application. jps, get PID of a running Java process: localhost bin # jps 22763 Jps 9771 Bootstrap 2275 Startup    jmap, create memory dumps from a running process. Example, get PermGen statistics from a ...Read More

Here are my heavy used Maven2 commands Build Project without Unit Tests: mvn package -Dmaven.test.skip=true Display Dependency Tree: mvn dependency:tree Download all Project Dependencies: mvn dependency:go-offline Deploy JAR into internal Repository (Spring example): mvn deploy:deploy-file -DgroupId=spring -DartifactId=springframework -Dversion=1.2.9 -Dpackaging=jar -Dfile=c:tmpdistspring.jar -DrepositoryId=YOUR-REPO -Durl=scp://cvs.YOUR.REPO.com/java/maven2/ Build Eclipse Project File: mvn eclipse:eclipse Further reading: Professional Java ...Read More

Some hand commands if you need to improve some SQL Queries: analyze query: explain select .. from TABLE; show index: show index from TABLE; analyze table: analyze table TABLE; sql query without cache: select SQL_NO_CACHE .. from TABLE; show mysql cache status: SHOW VARIABLES LIKE 'query_cache%'; Read More

Some handy Oracle query's: Data dictionary: SELECT * FROM dict; User details: SELECT * FROM user_users; User roles: SELECT * FROM user_role_privs; User privileges: SELECT * FROM user_sys_privs; My triggers: SELECT SUBSTR(object_name,1,40), object_type, status FROM user_objects WHERE object_type IN ('TRIGGER'); My procedures and functions: Read More

JSP / JSTL Cheat Sheet">

JSP / JSTL Cheat Sheet: <%-- Define standart tag lib's (C: and fmt:). --%> <%@ page language="java" contentType="text/html" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <fmt:setBundle basename="application" scope="session" /> <%-- INCLUDE ANOTHER FILE, FOR EXAMPLE A MENU-HEADER--%> <jsp:include page="menu.jsp" flush="true" /> <%-- SIMPLE ...Read More

GNU Screen cheat-sheet">

Screen Home: http://www.gnu.org/software/screen/ Basics: -ctrl a c -> create new window -ctrl a A -> set window name -ctrl a w ...Read More

some usefull linux commands rpm -ivh packages(s).rpm install rpm file(s) rpm -Uvh packages(s).rpm upgrade system with rpms rpm -e package remove package rpm -q package show version of package installed rpm -q -i package show all package metadata rpm -q -f /path/file what package does file belong find -name "*.[ch]" | xargs grep ...Read More

To repair a MySQL table, here are some VERY BASIC steps: 1.) Start admin tool: # mysql -u root 2.) Connect to db # connect DBNAME 3.) Repair it and cross fingers # repair table TABLENAME Ofcourse you need to replace the DBNAME and TABLENAME with you ...Read More