Skip to content

Instantly share code, notes, and snippets.

View edenir-anschau's full-sized avatar

Edenir Norberto Anschau edenir-anschau

  • São Paulo, SP, Brazil
View GitHub Profile
edenir-anschau /
Created July 14, 2020 17:30 — forked from MatthewJDavis/
Java SSL poke from atlassian
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
public class SSLPoke {
public static void main(String[] args) {
package test;
import org.apache.http.HttpStatus;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static com.jayway.restassured.RestAssured.*;
edenir-anschau / persistence.xml
Created February 6, 2017 18:09 — forked from mortezaadi/persistence.xml
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=""
<!-- derby -->
edenir-anschau / dabblet.css
Created January 21, 2017 21:55 — forked from anonymous/dabblet.css
div {
width: 100px;
height: 100px;
/* Para deixar o texto centralizado na div,
podemos colocar um line-height igual à altura
dela. Só funciona bem se o texto tiver uma
linha só.
line-height: 100px;
text-align: center;
edenir-anschau /
Created July 16, 2016 14:09 — forked from P7h/
Sample example demonstrating usage of Stopwatch API of Google Guava.
import java.util.Random;
import java.util.concurrent.TimeUnit;
* Sample example demonstrating usage of Stopwatch API of Google Guava.
* @see <a href="">Guava Stopwatch</a>
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 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