Skip to content

Instantly share code, notes, and snippets.

View dannyelcf's full-sized avatar
🦊
Coding...

Dannyel Cardoso da Fonseca dannyelcf

🦊
Coding...
View GitHub Profile
@dannyelcf
dannyelcf / tts_en.py
Last active February 17, 2019 02:00
Text to Speech using requests library and Bing translator. For each file's line will be generated one mp3 audio file.
#!/usr/bin/env python
#coding: utf-8
import sys
import hashlib
import requests
import urllib
import time
import random
import os.path
@dannyelcf
dannyelcf / mvn_docker.sh
Created October 3, 2018 12:28
Run maven project inside docker.
#!/bin/bash
docker run -it --rm --name mvn_docker \
-v "$HOME/.m2":/root/.m2 \
-v "$(pwd)":/tmp/tdd-lab \
-w /tmp/tdd-lab \
maven:3.5.4-jdk-8-alpine \
mvn "$@"
@dannyelcf
dannyelcf / gera_registros_por_intervalo.sql
Created October 1, 2018 18:31
Gera um registro para cada ano dentro do intervalo (ano_inicio, ano_fim)
WITH dados_teste AS (
/* Gera dados de exemplo */
SELECT *
FROM (VALUES ('d1', 'Zé', 2010, 2012),
('d2', 'Jão', 2010, 2015),
('d3', 'Zoio', 2010, 2018))
AS t (id, nome, ano_inicio, ano_fim)
)
SELECT tb.id, tb.nome, tb.ano_inicio, tb.ano_fim,
/* Gera uma linha para cada ano dentro do intervalo (ano_inicio, ano_fim) */
@dannyelcf
dannyelcf / dl-jdk8.sh
Created August 5, 2018 00:44
cURL to donwload JDK 8
#!/bin/sh
curl -L -b "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz -O