Skip to content

Instantly share code, notes, and snippets.

View lucasrcezimbra's full-sized avatar
🐍

Lucas Rangel Cezimbra lucasrcezimbra

🐍
View GitHub Profile
set nocompatible
filetype off
set shell=bash
set hlsearch
" Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'mattn/emmet-vim'
@lucasrcezimbra
lucasrcezimbra / fetch_real_estates_prices.py
Created October 22, 2016 02:29
Get and print rent price from ZapImoveis
import json
import requests
headers = {"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.102 Safari/537.36"}
url = 'http://www.zapimoveis.com.br/BuscaMapa/ObterOfertasBuscaMapa/'
data = {'parametrosBusca': '{"CoordenadasAtuais":{"Latitude":-30.034082252323874,"Longitude":-51.21221809265136},"CoordenadasMinimas":{"Latitude":-30.034948378031114,"Longitude":-51.21566741344452},"CoordenadasMaximas":{"Latitude":-30.03321611904691,"Longitude":-51.20876877185822},"Transacao":"Locacao","TipoOferta":"Imovel"}'}
req = requests.post(url, headers=headers, data=data)
estates_data = json.loads(req.text)
@lucasrcezimbra
lucasrcezimbra / gallery.py
Created May 31, 2017 20:33
Resize and compress images for gallery
@lucasrcezimbra
lucasrcezimbra / settings.py
Created June 2, 2017 04:27
Django init settings.py with dj-database-url and python-decouple
"""
Django settings for subscriptions project.
Generated by 'django-admin startproject' using Django 1.10.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
@lucasrcezimbra
lucasrcezimbra / git-author-rewrite.sh
Last active July 18, 2017 12:25
Rewrite name and e-mail on git history
#!/bin/sh
# Rewrite author name and e-mail on git history.
# Rewrites commits not pushed, from origin/HEAD to HEAD (origin/HEAD..HEAD)
# --env-filter https://git-scm.com/docs/git-filter-branch#git-filter-branch---env-filterltcommandgt
# -- origin/HEAD..HEAD https://git-scm.com/docs/git-rev-list#_description
git filter-branch --env-filter '
OLD_EMAIL="MY OLD E-MAIL"
CORRECT_NAME="MY CORRECT NAME"
import argparse
import sys
import unittest
from collections import namedtuple
from datetime import datetime, timedelta
def ponto(args):
return _ponto(
args.entry,
working = args.working_hours,
@lucasrcezimbra
lucasrcezimbra / fujam.py
Last active August 17, 2017 14:02 — forked from jbiason/fujam.py
from __future__ import print_function
import random
import argparse
CONSONANTS = ['f', 'j', 'c', 'l', 'n']
PASSPHRASE = '{}u{}am para as {}o{}i{}as'
from __future__ import print_function
import random
import argparse
CONSONANTS = ['f', 'j', 'c', 'l', 'n']
PASSPHRASE = '{}u{}am para as {}o{}i{}as'
@lucasrcezimbra
lucasrcezimbra / keybase.md
Created January 5, 2018 10:31
keybase.md

Keybase proof

I hereby claim:

  • I am lrcezimbra on github.
  • I am lrcezimbra (https://keybase.io/lrcezimbra) on keybase.
  • I have a public key ASB15rbFCeB7LsG9L3h2W2MYpoSxO39wLVFWXnpsbRk-tgo

To claim this, I am signing this object:

import os
import random
import tempfile
import requests
TEMPDIR = tempfile.gettempdir()
TEMP_WORDS_FILE = os.path.join(TEMPDIR, 'ista_words')