Skip to content

Instantly share code, notes, and snippets.


João Antonio Ferreira joao-parana

View GitHub Profile
View gist:4564314
var http = require('http');
var path = require('path');
var fs = require('fs');
var mimeTypes = {
'.js' : 'text/javascript',
'.html' : 'text/html',
'.css' : 'text/css'
joao-parana /
Created May 21, 2013
Usando o MOXy no EclipseLink
package br.cepel.xml;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
joao-parana / Script-Astah-01.js
Last active Dec 18, 2015
Imprime nomes de classes e interfaces e respectivos atributos e métodos
View Script-Astah-01.js
var classes = astah.findElements(IClass);
var rowData = [];
for(var i in classes) {
var clazz = classes[i];
// rowData.push(clazz.getOwner().getName());
View MyListenerAndMyEntityWithListener
package model.entity;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
@Entity @EntityListeners(MyListener.class)
public class MyEntityWithListener {
private long id;
joao-parana / metaphone.js
Last active Jan 22, 2021
Modulo YUI 3 para calculo fonético baseado no Algoritimo Metaphone
View metaphone.js
/***************************** COPYRIGHT NOTICES ***********************
Some of this code is based on metaphone.c file, which can be found here:
The metaphone port is authored by Carlos Costa Jordao <>
and is covered under this copyright:
Copyright 2014, Carlos Costa Jordao <>.
All rights reserved.
joao-parana / TesteMetaphone.html
Last active Jan 22, 2021
Teste de Módulo Metaphone
View TesteMetaphone.html
<!DOCTYPE html>
<!-- -->
<meta charset="UTF-8">
<title>Teste de Módulo Metaphone</title>
<!-- CSS: Alloy Bootstrap -->
<link href="" rel="stylesheet">
<!-- O loader do AUI fica em /js/aui/aui e os diversos modulos em /js/aui -->
<script charset="utf8" src=""></script>
joao-parana /
Created Oct 2, 2015 — forked from voxxit/
Consul + Vault + MySQL = <3
git clone vault
cd vault
docker-compose up -d
export VAULT_ADDR=

Initializing a vault:

vault init
joao-parana /
Created Oct 21, 2016
Install docker and docker-compose Ubuntu Linux 16.04
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
joao-parana / FutureDemo.scala
Created Mar 21, 2017
Testing non blocking futures
View FutureDemo.scala
package myscala.others
import scala.concurrent.Future
import scala.util.{Failure, Random, Success}
object FutureDemo {
def sleep(duration: Long) {