Skip to content

Instantly share code, notes, and snippets.

@diraol
diraol / Exemplodeuso.tex
Last active August 29, 2015 14:02
Macro para Requisitos de Engenharia de Software em LaTeX
%%01
\vfill
\begin{Requisito}
\ReqTipo{funcional}%Tipo
\ReqNome{Cadastrar usuário}%Nome
%\ReqLabel{cadUsu}%Label
\ReqDescr{O usuário realiza seu cadastro na plataforma.}%Desc.
\ReqPrioridade{alta}%Prioridade
\ReqStatus{aprovado}%Status
\ReqEstabilidade{alta}%Estabilidade
@diraol
diraol / join_all_partie_members.sh
Last active December 28, 2015 08:49
shell script to join all files from "Filiados Partidários" obtained on TSE repository into one single file with all political partie members.
#!/bin/bash
#To run this script you should be on a "root folder" on the same level as the "filiados_<nome_partido>_<estado>" folders
# So, the folder structure would be:
# - current_folder
# |
# | - partido_xx_aa
# | - partido_xy_bb
# ...
# The script will generate a single "br_filiados.csv" file.
#
@diraol
diraol / servidores_e_filiados
Created November 22, 2013 03:16
Servidores e Filiados
{"PEN": {"INSTITUTO NACIONAL DE SEGURO SOCIAL": 6, "FUNDACAO OSWALDO CRUZ": 1, "FUND. INST. BRASIL. GEOG. E ESTATISTICA": 1, "UNIVERSIDADE FEDERAL DE GOIAS": 1, "INSTITUTO NAC. DE COLONIZ E REF AGRARIA": 1, "UNIVERSIDADE FEDERAL DO PARA": 3, "INSTITUTO FEDERAL DO PIAUI": 1, "UNIVERSIDADE FEDERAL DO CEARA": 6, "INSTITUTO FEDERAL DO PARANA": 1, "FUNDACAO UNIVERSIDADE DO MARANHAO": 1, "INSTITUTO FEDERAL DO CEARA": 2, "UNIVERSIDADE FED.DO TRIANGULO MINEIRO": 1, "MINISTERIO DA SAUDE": 6, "DEPARTAMENTO DE POLICIA FEDERAL": 9, "MINIST.DA CIENCIA, TECNOLOGIA E INOVACAO": 1, "MINISTERIO DA FAZENDA": 2, "FUNDACAO UNIVERSIDADE DE BRASILIA": 1, "MINIST.DA AGRICULTURA,PECUARIA E ABAST.": 1, "GOVERNO DO EX-TERRITORIO DE RORAIMA": 4, "FUNDACAO NACIONAL DE SAUDE": 1, "SERVICO FED. DE PROCESSAMENTO DE DADOS": 1, "UNIVERSIDADE FEDERAL DE MINAS GERAIS": 1, "COMPANHIA NACIONAL DE ABASTECIMENTO": 1, "COMISSAO NACIONAL DE ENERGIA NUCLEAR": 1, "UNIVERSIDADE FEDERAL DE ALAGOAS": 1, "COMANDO DA AERONAUTICA": 1, "FUNDACAO UNIVERSIDADE
@diraol
diraol / multiple_exceptions.py
Last active June 15, 2016 18:05 — forked from cemsbr/multiple_exceptions.py
Throw multiple validation errors
# based on http://stackoverflow.com/questions/6470428/catch-multiple-exceptions-in-one-line-except-block
class ValidationError(Exception):
def __init__(self, attribute_name, message):
self.attribute_name = attribute_name
self.message = message
def __str__(self):
return self.message
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diraol
diraol / Installing VIM with python3 (compiled from source)
Last active September 9, 2017 19:41
Install Vim 8 with Python 3, Ruby and Lua support on Debian
sudo apt remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt install liblua5.1-dev luajit libluajit-5.1 python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~/tools
@diraol
diraol / Mailman_BanAll_and_Discard.js
Last active April 29, 2018 01:26
Mailman BanAll + Discard
// Load a recent jquery version
var jq = document.createElement('script');
jq.src = "https://code.jquery.com/jquery-3.1.1.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// Wait until jquery is loaded before running the code below
window.setTimeout(()=>{
jQuery.noConflict();
// Check everyone for BAN
jQuery("input[name|='senderbanp']").attr('checked', true)
// Check everyone for filtering action
@diraol
diraol / keybase.md
Created December 28, 2018 14:04
keybase certification

Keybase proof

I hereby claim:

  • I am diraol on github.
  • I am diraol (https://keybase.io/diraol) on keybase.
  • I have a public key ASAd47mpwKVkyZF9GXqivzXxxF21LRA3n8ZJ6RNYnwttmQo

To claim this, I am signing this object:

@diraol
diraol / quick-slugify.sh
Last active February 17, 2019 13:46 — forked from oneohthree/quick-slugify.sh
Quick bash slugify
# POSIX Compatible
# Remove leading and trailing spaces and dashes
# also zsh compatible
echo " - - Esperança do vôo do avião - - " | iconv -t ascii//TRANSLIT | sed -E 's/[~\^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+\|-+$//g' | sed -E 's/^-+//g' | sed -E 's/-+$//g' | tr A-Z a-z
@diraol
diraol / profile_report_minimal_settings_bug_report.ipynb
Last active October 13, 2020 15:07
profile_report_minimal_settings_bug_report.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.