Skip to content

Instantly share code, notes, and snippets.

View ulymarins's full-sized avatar

Ulysses Marins ulymarins

View GitHub Profile
SELECT DISTINCT
unity.id AS idUnity,
unity.name,
unity.active,
NULL AS idFact,
NULL AS descricao,
NULL AS title,
TRUNCATE((SELECT
ST_DISTANCE_SPHERE(POINT(- 30.0275415, - 51.1826964),
POINT(unity.lng, unity.lat))
@ulymarins
ulymarins / app.java
Created January 23, 2017 17:24
Crypto 4all
public class App {
public static void main(String [] args) {
System.out.println("Chave 16bits: G3r0m3lcr1pt0666");
System.out.println("Vetor: RandomInitVector");
System.out.println("Iniciando criptografia");
String conteudoCriptografado = Crypto.encryptAES("tipoQr=4park&valorPassagem=250&id4all=2345");
System.out.println("Conteúdo criptografado: " + conteudoCriptografado);
@ulymarins
ulymarins / aes.java
Last active October 6, 2020 11:18
Java Encryption with AES
import java.math.BigInteger;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.util.Random;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Base64;
@ulymarins
ulymarins / sshScript.sh
Created July 31, 2016 10:52
Simple bash script created to access some server via ssh and execute sudo commands.
#!/bin/bash
HELLO="world"
ssh -t user@target bash -c "'
ls
pwd
if true; then