Sunday, November 2, 2014

HTML report for unit tests

# Run tests and generate .xml reports
mvn clean test

# Convert .xml reports into .html report, but without the CSS or images
mvn surefire-report:report-only

# Put the CSS and images where they need to be without the rest of the
# time-consuming stuff
mvn site -DgenerateReports=false

Go to target/site/surefire-report.html for the report.

Terminal code \E?1034h

When  I was working with cqlsh (the command line client for Cassandra database), I tried to create a cleanup script which execute some CQL delete queries.  It turns out, the cqlsh client is a python-based command line client and it could generate a special code, a shell escape sequence (\E[?1034h).
I found more inforation here.


Wednesday, October 22, 2014

Libraries / frameworks


Java libs
JHipster
Spring Boot
Metrics
Logback
Ehcache
Jersey


Java Tools
Maven (plugins: surefire, surefire-reportassembly, antrun, javadoc, sourcecheckstyle, eclipse, help)
Ant
Tomcat / Jetty
Eclipse / IntelliJ

JavaScript
AngularJS
KnockoutJS
Deck.js
highlight.js

JavaScript Tools / Node.js
GruntJS
Bower
Karma
NodeJS
Jasmine
Mustache
UnderscoreJS
Firebug

CSS
SASS
LESS

CSS Tools
Compass


API References
JavaScript
Graphite


Google account


At job, if you want to keep your bookmarks & chrome plugins in sync between different computers, but you don't want to mix them with your personal account, just create a Google Account with your professional email address.

Monday, September 22, 2014

Java - OWASP ESAPI

The standard library for security is ESAPI from the OWASP fondation.

The OWASP Enterprise Security API GitHub repositories:

https://github.com/ESAPI/esapi-java
https://github.com/ESAPI/esapi-java-legacy

Thursday, July 10, 2014

windows - Sync left pane in Explorer with opened folder

Click on an empty space on the left pane, enable: "Show all folders" and "Expand to current folder"

Source

Monday, July 7, 2014

bash - history sharing between sessions


# .bash_rc
HISTSIZE=9000
HISTFILESIZE=$HISTSIZE
HISTCONTROL=ignorespace:ignoredups

history() {
  _bash_history_sync
  builtin history "$@"
}

_bash_history_sync() {
  builtin history -a         #1
  HISTFILESIZE=$HISTSIZE     #2
  builtin history -c         #3
  builtin history -r         #4
}

PROMPT_COMMAND=_bash_history_sync


history() overrides the original function to make sure that the history is synchronised before it is printed, so the numbers match.

Source | cheat sheet (pdf) | Nice article