Skip to content

Instantly share code, notes, and snippets.

View rafaeltuelho's full-sized avatar
🎯
Focusing

Rafael T. C. Soares (A.K.A Tuelho) rafaeltuelho

🎯
Focusing
  • Red Hat Inc.
  • Frisco, TX, USA
  • 17:01 (UTC -05:00)
View GitHub Profile
@rafaeltuelho
rafaeltuelho / jboss-eap-offical-repos-pom.xml
Created November 10, 2014 19:33
JBoss EAP Official Maven Repo conf... Ref:
<repositories>
<repository>
<id>jboss-eap-repository</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
@rafaeltuelho
rafaeltuelho / jboss-as-maven-plugin-pom.xml
Created November 10, 2014 19:53
jboss-as-maven-plugin example
<build>
<!-- Maven will append the version to the finalName (which is the name
given to the generated war, and hence the context root) -->
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
@rafaeltuelho
rafaeltuelho / snoop.jsp
Created November 13, 2014 02:14
JBoss EAP 6.0 JSP snoop page (from Openshift sample JBoss app)
<HTML>
<HEAD>
<TITLE>JBossEAP6.0 JSP snoop page</TITLE>
<%@ page import="javax.servlet.http.HttpUtils,java.util.Enumeration" %>
<%@ page import="java.lang.management.*" %>
<%@ page import="java.util.*" %>
</HEAD>
<BODY>
<H1>WebApp JSP Snoop page</H1>
@rafaeltuelho
rafaeltuelho / maven-settings-brms.xml
Created November 19, 2014 14:10
Maven settings.xml sample to use JBoss BRMS Maven Repo
<!-- It is either needed to turn on pre-emptive authentication for the repository server by -->
<server>
<id>guvnor-m2-repo</id>
<username>admin</username>
<password>admin</password>
<configuration>
<wagonProvider>httpclient</wagonProvider>
<httpConfiguration>
<all>
<usePreemptive>true</usePreemptive>
@rafaeltuelho
rafaeltuelho / doDocker.sh
Created December 3, 2014 02:24
Issue a Docker command to all active containers
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 start|stop|pause|unpause|<any valid docker cmd>"
exit 1
fi
for c in $(sudo docker ps -a | awk '{print $1}' | sed "1 d")
do
sudo docker $1 $c
@rafaeltuelho
rafaeltuelho / jgroups_jvm_startup_params.sh
Last active August 29, 2015 14:12
JGroups app startup params to avoid issues in a host with multiples network ifcs
java -cp . com.your.project.MainClass -Djgroups.bind_addr=127.0.0.1 -Djava.net.preferIPv4Stack=true
@rafaeltuelho
rafaeltuelho / infinispan7-repl-cache.xml
Created December 29, 2014 21:16
Infinispan 7.x clustered replicated cache simple conf
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:7.0 http://www.infinispan.org/schemas/infinispan-config-7.0.xsd"
xmlns="urn:infinispan:config:7.0">
<jgroups>
<stack-file name="udp" path="default-configs/default-jgroups-udp.xml"/>
<stack-file name="tcp" path="default-configs/default-jgroups-tcp.xml"/>
</jgroups>
@rafaeltuelho
rafaeltuelho / infinispan7-local-cache.xml
Created December 29, 2014 21:17
Infinispan 7.x local cache with eviction and expiration features simple conf
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:7.0 http://www.infinispan.org/schemas/infinispan-config-7.0.xsd"
xmlns="urn:infinispan:config:7.0">
<cache-container default-cache="default" >
<local-cache name="evictionCache">
@rafaeltuelho
rafaeltuelho / camel-spring-context-route-ref.xml
Created January 10, 2015 10:13
Camel spring context sample: referring to a Java DSL defined route (Camel RouteBuilder impl). This demonstrates the way you can put Camel and Spring to work together.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="helloBean" class="br.net.rafaeltuelho.MyBean"/>
<bean id="route" class="br.net.rafaeltuelho.MyCamelRouteImpl"/>
@rafaeltuelho
rafaeltuelho / pom-with-distro-mgt-repo.xml
Last active August 29, 2015 14:14
Maven POM with Distribution Management sample to deploy artifacts in a custom repository (eg. internal corporate Sonatype Nexus)
<distributionManagement>
<repository>
<id>releases</id>
<name>Releases</name>
<url>http://my.internal.nexus.com/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Snapshots</name>
<url>http://my.internal.nexus.com/nexus/content/repositories/snapshots</url>