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
edenir-anschau / SSLPoke.java
Created July 14, 2020 17:30 — forked from MatthewJDavis/SSLPoke.java
Java SSL poke from atlassian
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@edenir-anschau
edenir-anschau / IllegalStateException_thrown_by_DevTools.md
Last active November 13, 2017 10:13
IllegalStateException thrown by DevTools
[INFO] Attaching agents: []
Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/home/user/.m2/repository/ognl/ognl/3.0.8/ognl-3.0.8.jar
	at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:110)
	at org.springframework.boot.devtools.restart.ChangeableUrls.fromUrlClassLoader(ChangeableUrls.java:96)
	at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:93)
	at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:56)
	at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
	at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:546)
	at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:67)

at org.springframework.boot.d

@edenir-anschau
edenir-anschau / git_branch_ps1
Created March 26, 2017 04:32
git_branch_ps1
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[1;31m\]"
YELLOW="\[\033[1;33m\]"
GREEN="\[\033[1;32m\]"
NO_COLOR="\[\033[0m\]"
PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "
package test;
import org.apache.http.HttpStatus;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.bio.SocketConnector;
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
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="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
@edenir-anschau
edenir-anschau / dabblet.css
Created January 21, 2017 21:55 — forked from anonymous/dabblet.css
Untitled
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
edenir-anschau / gist:ff5dd1c6473d51c68a16ce4fdf5a38d1
Created December 20, 2016 02:53
Allowing less secure apps to access gmail account
https://support.google.com/accounts/answer/6010255
@edenir-anschau
edenir-anschau / gist:e75af8d0c497370a94b8
Last active December 13, 2016 13:34
Git sees maven empty project
touch src/main/java/.gitignore src/main/resources/.gitignore src/test/java/.gitignore src/test/resources/.gitignore
byte[] bytes = ByteStreams.toByteArray(inputStream);
http://google.github.io/guava/releases/19.0/api/docs/com/google/common/io/ByteStreams.html#toByteArray(java.io.InputStream)