Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Wesley Egberto wesleyegberto

🎯
Focusing
Block or report user

Report or block wesleyegberto

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
@wesleyegberto
wesleyegberto / static_server.js
Created Aug 5, 2016 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
View static_server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@wesleyegberto
wesleyegberto / Java_Deps_Test_JaxRs.md
Last active Aug 22, 2017
Dependencies to test JAX-RS
View Java_Deps_Test_JaxRs.md

Dependencies to test JAX-RS

Dependencies to POM.xml

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
    <scope>test</scope>
@wesleyegberto
wesleyegberto / Java_Deps_Test_Using_Embedded_JaxRs.md
Last active Dec 28, 2016
Dependecies to test in a embedded JAX-RS (may need update the version)
View Java_Deps_Test_Using_Embedded_JaxRs.md

#Dependecies to test in a embedded JAX-RS

may need update

Dependencies to POM.xml

<dependency>
    <groupId>org.glassfish.jersey.test-framework.providers</groupId>
    <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
    <version>2.22</version>
@wesleyegberto
wesleyegberto / Java_Deps_Test_Jpa.md
Last active Dec 28, 2016
Dependencies e configs to test JPA using Derby (may need update)
View Java_Deps_Test_Jpa.md

#Dependencies e configs to test JPA using Derby

may need update

Dependecies to POM.xml

<dependency>
    <groupId>org.eclipse.persistence</groupId>
    <artifactId>eclipselink</artifactId>
    <version>2.6.0</version>
@wesleyegberto
wesleyegberto / Java_Deps_Arquillian_Junit.md
Created Dec 29, 2016
Dependencies to use Arquillian with JUnit
View Java_Deps_Arquillian_Junit.md

#BOM for Arquillian

Dependencies to use Arquillian with JUnit

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.jboss.arquillian</groupId>
      <artifactId>arquillian-bom</artifactId>
      <version>1.1.9.Final</version>
@wesleyegberto
wesleyegberto / web.xml
Created Mar 7, 2017
web.xml for Servlet 3.1
View web.xml
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
View AngularJS-sublime-package.sublime-settings
{
"disable_default_directive_completions": false
}
@wesleyegberto
wesleyegberto / Context.xml
Created Apr 8, 2017
CDI 1.2/2.0 on Tomcat
View Context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- webapp/META-INF/Context.xml -->
<Manager pathname=""/>
<Resource name="BeanManager"
auth="Container"
type="javax.enterprise.inject.spi.BeanManager"
factory="org.jboss.weld.resources.ManagerObjectFactory"/>
</Context>
View Kubernetes Utils
## Cluster
### Cluster info
kubectl cluster-info
kubectl get nodes
kubectl describe node
### Listar os eventos
kubectl get events
@wesleyegberto
wesleyegberto / traffic_generator.sh
Created Jun 29, 2018
Script to generate traffic
View traffic_generator.sh
#!/bin/sh
# Source: https://github.com/pilhuhn/microprofile-demo/blob/mpm-2.0-testing/parallel_count_traffic_generator.sh
#set -x
while true
do
END=$((RANDOM % 10 +1 ))
echo $END
for i in `seq $END`
You can’t perform that action at this time.