Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.0/dist/chart.min.js"></script>
<style>
.red {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.red {
color: red;
@adlerdias
adlerdias / download.py
Created September 28, 2020 13:34
Alguém tem curiosidade de saber como baixar os dados históricos da B3 automaticamente
import os
from multiprocessing import Pool, cpu_count
import urllib.request
urlbasepath='http://bvmf.bmfbovespa.com.br/InstDados/SerHist/COTAHIST_A'
ext='.zip'
# não dá pra usar os cores pois os downlads dependem da sua banda
multiplier=2
# troca pelo path que você preferir ex: c:/
destinationPath = os.path.dirname(os.path.abspath(__file__))+'/downloads/'
@adlerdias
adlerdias / settings.json
Created April 1, 2020 16:53
visual studio code settings.json -> search.exclude
"search.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/tmp": true,
"**/node_modules": true,
"**/bower_components": true,
// Hide everything in /public, except "index.php"
@adlerdias
adlerdias / .zshrc
Last active February 6, 2019 13:04
alias weather='curl -s wttr.in | sed -n "1,7p"'
alias update='sudo ntpdate ntp.nics.unicamp.br'
alias g='git'
alias gs='git status'
alias nah='git reset --hard;git clean -df'
alias d='docker'
alias dc='docker-compose'
alias dm='docker-machine'
alias artisan='php artisan'
alias serve='artisan serve'
@adlerdias
adlerdias / Mask.php
Last active January 23, 2019 12:54
mascara para cpf/cnpj/telefone
<?php
namespace App\Traits;
trait Mask
{
/**
* Clear the given string
*
* @param string $str
*
@adlerdias
adlerdias / post_install.md
Last active January 9, 2019 18:29
Ubuntu 18.04: Pretiffy

1 Show address bar with full path in Nautilus instead of breadcrumbs bar

$ gsettings set org.gnome.nautilus.preferences always-use-location-entry true

or

@adlerdias
adlerdias / dotnet_sdk.md
Created January 8, 2019 15:21
Ubuntu 18.04: .NET Core SDK on Linux Ubuntu

1 Install .NET Core SDK on Linux Ubuntu 18.04 x64

$ sudo add-apt-repository universe
$ sudo apt-get install apt-transport-https
$ sudo apt-get update
$ sudo apt-get install dotnet-sdk-2.2  
@adlerdias
adlerdias / mysql.md
Created January 4, 2019 13:38
Ubuntu 18.04: Mysql

1 Install Mysql

$ sudo apt-get install mysql-server
$ mysql_secure_installation    

2 If you got Error: Access denied for user 'root'@'localhost' on mysql_secure_installation

@adlerdias
adlerdias / zsh.md
Last active January 4, 2019 13:28
Ubuntu 18.04: zsh + oh-my-zsh

1 install zsh and git

$ sudo apt-get install zsh git-core

2 install oh-my-zsh