Skip to content

Instantly share code, notes, and snippets.

Evandro Oliveira oliveiraev

Block or report user

Report or block oliveiraev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View gitattributes.sh
#!/usr/bin/env /bin/bash
set -e
function writeHeader () {
python3 - ${1} <<EOF
# -*- coding: utf-8 -*-
import sys
import os
@oliveiraev
oliveiraev / convert.py
Created Sep 15, 2017
Imprimidor de numeral ordinal.
View convert.py
# -*- coding: utf-8 -*-
u"""Imprimidor de numeral ordinal."""
import sys
UNITS = [
'',
'primeiro',
View .vimrc
" Utiliza a área de transferência do sistema
set clipboard=unnamed,unnamedplus
" Navegação por teclas direcionais
noremap <UP> k
noremap <C-UP> (
noremap <RIGHT> l
noremap <C-RIGHT> E
noremap <DOWN> j
noremap <C-DOWN> )
View add_date.py
# -*- coding: utf-8 -*-
"""
Adiciona períodos a datas
"""
import datetime
DAY = "1"
WEEK = "7"
MONTH = "30"
@oliveiraev
oliveiraev / pretty_json
Created Nov 26, 2014
Given an input (filename or stdin), prints out it space-indented
View pretty_json
#!/usr/bin/env node
/**
* @name JSON Prettifier
* @summary Given an input (filename or stdin), prints out it space-indented
* @license [LGPLv3]{@link https://www.gnu.org/licenses/lgpl-3.0.txt}
* @version 0.0.1a
*
*/
(function () {
"use strict";
@oliveiraev
oliveiraev / Jasmine-to-Casper.js
Last active Dec 26, 2015
Convert Jasmine suite into parseable CasperJS test suite.
View Jasmine-to-Casper.js
/**
* Convert Jasmine suite into parseable CasperJS test suite.
*/
casper.parseJasmineTests = (function (casper) {
"use strict";
/**
* Build a structure from Jasmine test results.
*
* Each spec generates an object with two keys: specs and tests.
@oliveiraev
oliveiraev / linux-to-vagrant.sh
Last active Dec 25, 2015
Set up any debian/redhat-based distro ready for vagrant.
View linux-to-vagrant.sh
test "$(command -v su)" || (echo "su is required but not found" && exit 1)
RUN="su"
test "$(command -v sudo)" && RUN="sudo su"
$RUN -c'
INSTALLER="apt-get"
test "$(command -v yum)" && INSTALLER="yum"
$INSTALLER install -y openssh-server
printf "\n#Vagrant additions\n" >> /etc/sudoers
useradd -s$SHELL vagrant
sed -ri "s/^vagrant:[^:]/vagrant:\!/" /etc/shadow
@oliveiraev
oliveiraev / web2py.sh
Last active Dec 18, 2015
Run web2py server whitin a virtualenv/pyenv
View web2py.sh
#!/usr/bin/env /bin/sh
PIDFILE="web2py.pid"
LOGFILE="web2py.log"
SERVER_NAME="web2py.local"
if [ ! "$1" ]; then
echo 'Usage: {start|stop|restart|status| --web2py params}'
exit 1
fi
View install-sublime-text.sh
#!/bin/bash
if [ ! -d /opt/Sublime* ]; then
if [ ! -f $HOME/Downloads/Sublime*.bz2 ]; then
echo "Ops! You must visit http://www.sublimetext.com/ and download the *.bz2 file to $HOME/Downloads."
exit
else
echo 'Installing Sublime Text...'
sudo mv $HOME/Downloads/Sublime*.bz2 /opt
You can’t perform that action at this time.