Skip to content

Instantly share code, notes, and snippets.

View edo9k's full-sized avatar
🎱

Eduardo França edo9k

🎱
View GitHub Profile
@edo9k
edo9k / speak
Last active May 30, 2019 21:08
Gets text from clipboard and reads in the detected language (using the espeak tts system).
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# speak.py
#
# Copyleft 2016 Eduardo França <@edo9k>
#
# to install
# $ sudo apt install python-pip
# $ pip install future langdetect pyperclip sh
@edo9k
edo9k / crop_file_names.sh
Last active September 12, 2016 12:00
Bash one liner to crop all file names in one directory to the length specified in the 'cut' command. (This is done the hard & dumb way here, I'm pretty sure rename can do it better with the proper regex. I can't regex very that well.)
for i in $files; do echo "mv $i $(echo $i | cut -c 1-8)"; done
@edo9k
edo9k / codigo_de_barra_bb.py
Created May 31, 2016 22:08
Gera código de barras no estilo usado por bancos brasileiros. (usando a biblioteca PIL) Correção do código encontrado em https://thiagosm.wordpress.com/2008/06/07/codigo-de-barra-em-python/
#!/usr/bin/env python
# encoding: utf-8
import sys
from PIL import Image, ImageDraw, ImageFont
class codigodebarra:
def __init__(self):
pass