Skip to content

Instantly share code, notes, and snippets.


Wesley Egberto wesleyegberto

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 / 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 /
Last active Dec 28, 2016
Dependencies e configs to test JPA using Derby (may need update)

#Dependencies e configs to test JPA using Derby

may need update

Dependecies to POM.xml

wesleyegberto /
Last active Dec 28, 2016
Dependecies to test in a embedded JAX-RS (may need update the version)

#Dependecies to test in a embedded JAX-RS

may need update

Dependencies to POM.xml

wesleyegberto /
Created Dec 29, 2016
Dependencies to use Arquillian with JUnit

#BOM for Arquillian

Dependencies to use Arquillian with JUnit

wesleyegberto / Context.xml
Created Apr 8, 2017
CDI 1.2/2.0 on Tomcat
View Context.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- webapp/META-INF/Context.xml -->
<Manager pathname=""/>
<Resource name="BeanManager"
wesleyegberto /
Last active Aug 22, 2017
Dependencies to test JAX-RS

Dependencies to test JAX-RS

Dependencies to POM.xml

View AngularJS-sublime-package.sublime-settings
"disable_default_directive_completions": false
wesleyegberto /
Created Jun 29, 2018
Script to generate traffic
# Source:
#set -x
while true
END=$((RANDOM % 10 +1 ))
echo $END
for i in `seq $END`
wesleyegberto /
Created Jul 9, 2018
Example of script to automatically stash updates, checkout and merge a branch and then commit the changes
set -o errexit # Exit on error
git stash save 'Before deploy' # Stash all changes before deploy
git checkout deploy
git merge master --no-edit # Merge in the master branch without prompting
npm run build # Generate the bundled Javascript and CSS
if $(git commit -am Deploy); then # Commit the changes, if any
echo 'Changes Committed'
git push heroku deploy:master # Deploy to Heroku
wesleyegberto / backup_tracks_using_spotify_api.json
Last active Aug 3, 2018
Backup saved tracks from Spotify
View backup_tracks_using_spotify_api.json
$token="<Your Token>"
# API limits 50 tracks per request, so I paginate my 1100+ musics here
for i in `seq 0 50 1300`;
do curl -k -X "GET" "$i" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $token" >> musics.json;
You can’t perform that action at this time.