Skip to content

Instantly share code, notes, and snippets.

View davidalves1's full-sized avatar

David Alves de Souza davidalves1

View GitHub Profile
@davidalves1
davidalves1 / using-uuid-as-pk.md
Created November 5, 2021 00:09 — forked from rponte/using-uuid-as-pk.md
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

function createStore({ state, mutations }) {
return {
state: Vue.observable(state),
commit(key, ...args) {
mutations[key](state, ...args)
}
}
}
const store = createStore({
state: { count: 0 },
@davidalves1
davidalves1 / Raspa_salarios_UFRJ.py
Created October 26, 2017 00:01 — forked from fmasanori/Raspa_salarios_UFRJ.py
Raspa 15 mil vencimentos da UFRJ e mostra os maiores
import requests
from bs4 import BeautifulSoup as bs
u = 'http://www.portaldatransparencia.gov.br/servidores/OrgaoLotacao-ListaServidores.asp?CodOS=15000&DescOS=MINISTERIO%20DA%20EDUCACAO&CodOrg=26245&DescOrg=UNIVERSIDADE%20FEDERAL%20DO%20RIO%20DE%20JANEIRO&Pagina='
base = 'http://www.portaldatransparencia.gov.br/'
def extrai_valor(u):
j = u.find('=') + 1
k = u.find('&', j)
id_servidor = u[j: k]
@davidalves1
davidalves1 / install_mysql.sh
Created May 19, 2017 05:24 — forked from rrosiek/install_mysql.sh
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@davidalves1
davidalves1 / World Bank.py
Created May 5, 2017 03:11 — forked from fmasanori/World Bank.py
Acessa o Banco Mundial via api wb_data, plota o gráfico comparando três países segundo o GNI
#baseado em https://blogs.worldbank.org/opendata/accessing-world-bank-data-apis-python-r-ruby-stata
import wbdata
import matplotlib.pyplot as plt
#set up the countries I want
countries = ["CL","UY","BR"]
#set up the indicator I want (just build up the dict if you want more than one)
indicators = {'NY.GNP.PCAP.CD':'GNI per Capita'}