Skip to content

Instantly share code, notes, and snippets.


Edenir Norberto Anschau edenir-anschau

  • São Paulo, SP, Brazil
View GitHub Profile
edenir-anschau / gist:915b70289ce6b68a5845
Last active August 29, 2015 14:26
Eclipse: convert upper case text to lower case and viceversa with a simple shortcut
View gist:915b70289ce6b68a5845
Lower case: CTRL+SHIFT+Y
Upper case: CTRL+SHIFT+X
edenir-anschau / gist:77a40c3ab15f1244e26f
Created August 8, 2015 22:06
Hibernate possible values
View gist:77a40c3ab15f1244e26f
list of possible options are:
validate: validate the schema, makes no changes to the database.
update: update the schema.
create: creates the schema, destroying previous data.
create-drop: drop the schema at the end of the session.
edenir-anschau / ignore_foreign_key.sql
Created August 9, 2015 02:31
Ignore foreign key constraints
View ignore_foreign_key.sql
set foreign_key_checks=0
-- Source:
edenir-anschau /
Last active August 29, 2015 14:27
HTTP Response Java Enumeration Type
// LICENSE GPL 3.0 Peter Pilgrim,, 2012
* Implementation type HttpStatusCode
* (Only codes 400 to 417 and codes 500 to 524 implemented)
edenir-anschau /
Last active August 29, 2015 14:28 — forked from nicdoye/
Backup your OpenShift MySQL database. My DB is only small so I didn't bother to compress it through a pipe. sftp it back from your local machine afterwards This is basically a quick hack from running "type mysql" on the OpenShift gear - hint: it's a bash function/alias
mkdir ~/app-root/data/tmp
mysqldump -h $OPENSHIFT_MYSQL_DB_HOST -P ${OPENSHIFT_MYSQL_DB_PORT:-3306} -u ${OPENSHIFT_MYSQL_DB_USERNAME:-'admin'} --password="$OPENSHIFT_MYSQL_DB_PASSWORD" --all-databases > ~/app-root/data/tmp//all.sql
edenir-anschau / gist:5aea6bd3e827a1b58d73
Last active February 28, 2016 20:30
Solved: org.hsqldb.HsqlException: user lacks privilege or object not found: ENTITY_XPTO
View gist:5aea6bd3e827a1b58d73
edenir-anschau /
Created February 10, 2016 02:02 — forked from yanaga/
Normalização de Strings em Java
import java.text.Normalizer;
public class SemAcentoNemCedilha {
public static String normalizar(String s) {
return Normalizer.normalize(value, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
edenir-anschau /
Last active February 28, 2016 12:59
Merge multiple jasper prints
List<JasperPrint> jasperPrints = loadReports();
ByteArrayOutputStream out = new ByteArrayOutputStream();
JRPdfExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrints);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
edenir-anschau / banch_rename.bash
Last active February 28, 2016 21:15
Batch rename package in all .java files with find and sed
View banch_rename.bash
find . -type f -name "*.java" -exec sed -i "s/package oldPackage/package newPackage/" {} \;
edenir-anschau / gist:e75af8d0c497370a94b8
Last active December 13, 2016 13:34
Git sees maven empty project
View gist:e75af8d0c497370a94b8
touch src/main/java/.gitignore src/main/resources/.gitignore src/test/java/.gitignore src/test/resources/.gitignore