Skip to content

Instantly share code, notes, and snippets.

View franciscpd's full-sized avatar
🏠
Working from home

Francisross Soares de Oliveira franciscpd

🏠
Working from home
View GitHub Profile
@franciscpd
franciscpd / page_turn.dart
Created April 25, 2020 01:25 — forked from slightfoot/page_turn.dart
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@franciscpd
franciscpd / .zshrc
Last active February 29, 2020 15:42
ZShel config
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
export PYTHON_BUILD_ARIA2_OPTS="-x 10 -k 1M"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
export PATH="$JAVA_HOME/bin:$PATH"
@franciscpd
franciscpd / getStates.js
Created February 4, 2020 02:43
Obtém todos estados e cidades do Brasil na api do IBGE
const axios = require("axios");
const fs = require("fs");
async function getData() {
const data = await axios
.get("https://servicodados.ibge.gov.br/api/v1/localidades/estados")
.then(res => res.data);
const final = await Promise.all(
data.map(async ({ id, sigla, nome }) => {
@franciscpd
franciscpd / getStates.js
Created February 4, 2020 02:43
Obtém todos estados e cidades do Brasil na api do IBGE
const axios = require("axios");
const fs = require("fs");
async function getData() {
const data = await axios
.get("https://servicodados.ibge.gov.br/api/v1/localidades/estados")
.then(res => res.data);
const final = await Promise.all(
data.map(async ({ id, sigla, nome }) => {
@franciscpd
franciscpd / regex
Last active August 29, 2015 14:22
Regex util
const
regexDominio = '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$';
regexIP = '\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\' +
'.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.' +
'(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.' +
'(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b';
regexEmail = '^((?>[a-zA-Z\d!#$%&''*+\-/=?^_`{|}~]+\x20*' +
'|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*"\' +