- Copy the Bouncy Castle jar:
cp bcprov-jdk15on-156.jar $JAVA_HOME/jre/lib/ext/
- Bouncy Castle Provider Settings in java.security
function calculaDVGtin(digits) { | |
if (isNaN(digits)) return null; | |
var code = (digits).toString(), | |
even = odd = 0; | |
for (var i = code.length - 1; i >= 0; --i) { | |
if ((code.length - i) % 2 == 0) { | |
odd += Number(code.charAt(i)); | |
} else { |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
/** | |
* http://tripoverit.blogspot.com/2009/06/tripledes-encryption-compatibility.html | |
* http://nicholasbarger.com/2008/10/21/triple-des-encryption-class/ | |
* @author Waldinar Oliveira Neto | |
* | |
*/ | |
public class TripleDES { |
#!/bin/sh | |
# Moving some big folders from home user in the hard disk SSD for hard disk SATA | |
HDD_SATA='/Volumes/300' | |
folders=('Desktop' 'Documents' 'Dropbox' 'Downloads' 'Movies' 'Music' 'Pictures' 'Public' 'Screenshots') | |
mkdir Dropbox | |
for folder in ${folders[@]} | |
do |
function speechTest() { | |
var speech = new webkitSpeechRecognition; | |
speech.continuous = true; | |
speech.interimResults = true; | |
speech.lang = 'pt-BR'; | |
speech.onresult = function(e) { | |
console.log(e.results[e.results.length-1][0].transcript); | |
}; | |
speech.start(); | |
} |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; | |
public class SkipSSL { | |
public final static TrustManager[] TRUST_ALL_CERTS = new TrustManager[] { new X509TrustManager() { |
import static java.lang.annotation.ElementType.METHOD; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.util.HashMap; | |
import java.util.Map; |
#!/bin/sh | |
render=true | |
debug=${debug:-false} | |
BASENAME=`basename "$0"` | |
usage() { | |
if [ ! "$1" = "usage" ] ; then | |
return | |
fi |
#!/bin/bash | |
DIR=$(dirname `readlink -f ${BASH_SOURCE[0]}`) |
sudo cat /var/log/syslog | lolcat -F 0.1 |