Skip to content

Instantly share code, notes, and snippets.

@juanfezero
juanfezero / springSelectOptionsWithEnum
Last active November 19, 2015 19:59
spring select options with enum - juanfezero -
<!--
Enum example:
public enum Foo {
A("theA"), B("theB");
private String code;
private Foo(String code) {
this.code = code
}
//getter & setter's code
@juanfezero
juanfezero / getStacktraceAndPrint.java
Last active October 26, 2015 20:17
get stacktrace and print - juanfezero -
// ex is an exception (ExceptionUtils in commons.lang3)
Arrays.toString(ExceptionUtils.getStackFrames(ex))
@juanfezero
juanfezero / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@juanfezero
juanfezero / databaseCharToBooleanMappingHibernate.java
Last active October 26, 2015 20:15
database column char to boolean hibernate - juanfezero -
//if ADMIN database column contains 'yes' then admin = true
//otherwise admin = false
@Column(name = "ADMIN", columnDefinition = "char(3)")
@Type(type = "yes_no")
@NotEmpty
private boolean admin;
@juanfezero
juanfezero / eclipse.ini
Created September 6, 2016 14:44
Eclipse best .ini configuration
-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
@juanfezero
juanfezero / maven-java-version.xml
Last active July 17, 2017 17:50
maven java version
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>