Skip to content

Instantly share code, notes, and snippets.

Richard Osmar Leon Ingaruca jrichardsz

Block or report user

Report or block jrichardsz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jrichardsz
jrichardsz / read file in maven test uni junit.md
Created Oct 13, 2019
read file in maven test uni junit
View read file in maven test uni junit.md

package com.example; import org.apache.commons.io.IOUtils; public class FooTest { @Test public void shouldWork() throws Exception { String xml = IOUtils.toString( this.getClass().getResourceAsStream("abc.xml"), "UTF-8" ); }

@jrichardsz
jrichardsz / gitlab_webhook_json.json
Created Oct 13, 2019
Sample json Payload from Gitlab WebHook
View gitlab_webhook_json.json
{
"object_kind": "push",
"event_name": "push",
"before": "ecb9ff44aa0",
"after": "fa61658291900e59df0",
"ref": "refs/heads/snapshot",
"checkout_sha": "fa61658291900e59df0",
"message": null,
"user_id": 220253,
"user_name": "JRichardsz",
View Organization many to many Applications.java
@Entity
public class Organization extends GenericEntity {
@Column(length = 50)
@Required
private String name;
@Column(length = 50)
@Required
private String description;
@jrichardsz
jrichardsz / get pom data from jar.xml
Last active Oct 8, 2019
get pom data from jar, mavenized
View get pom data from jar.xml
workspace=$2
rm -rf $workspace
mkdir -p $workspace
mkdir -p $workspace/pom
dependencies_file=$workspace/dependencies.xml
function get_property {
grep "${1}" $2|cut -d'=' -f2
View maven web template
https://dzone.com/articles/how-to-create-a-web-project-using-maven-in-eclipse-1
@jrichardsz
jrichardsz / Modules
Last active Oct 8, 2019
openxava fixes
View Modules
package com.openxava.naviox;
import java.io.*;
import java.util.*;
import java.util.prefs.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.commons.logging.*;
@jrichardsz
jrichardsz / tomcat_log
Created Oct 7, 2019
tomcat severe enable log error
View tomcat_log
http://blog.trifork.com/2011/03/18/debugging-the-dreaded-severe-error-listenerstart-and-severe-error-filterstart-tomcat-error-messages/
WEB-INF/classes folder you can create a logging.properties
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
View activemq.md

Activemq with docker-compose

export ACTIVEMQ_ADMIN_PASSWORD=123456
export ACTIVEMQ_USER_PASSWORD=9876543
docker-compose up -d

docker-compose.yml

@jrichardsz
jrichardsz / open jdk implementations.md
Created Oct 5, 2019
Other JDK implementations, open jdk , java free versions
View open jdk implementations.md
@jrichardsz
jrichardsz / hibernate.cfg.xml
Last active Oct 4, 2019
hibernate openxava tests
View hibernate.cfg.xml
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<!--
This hibernate configuration is used only for IMAGES_GALLERY stereotype,
because this stereotype is implemented using hibernate native APIs.
If you do not use IMAGE_GALLERY you do not need this file.
The datasource configured here is the datasource in where the images will be
You can’t perform that action at this time.