Skip to content

Instantly share code, notes, and snippets.

View farnetani's full-sized avatar
🎯
Desenvolvendo em Golang

Arlei F. Farnetani Junior farnetani

🎯
Desenvolvendo em Golang
View GitHub Profile
@farnetani
farnetani / links-vscode-setup.md
Created October 25, 2019 23:14 — forked from plinionaves/links-vscode-setup.md
Default VSCode Setup (for all projects)

Remove all node_modules

choose the dir and run...

mac / linux

find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;

windows prompt

FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rm -rf "%d"

@farnetani
farnetani / LVM on Ubuntu howto
Created August 12, 2019 00:44 — forked from runozo/LVM on Ubuntu howto
Using LVM on Linux and resize swap partition
# RESCAN FOR NEWLY ADDED HDS
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
# NEW LOGICAL VOLUME
sudo fdisk /dev/sdb
# then create a new partition of type 8e (Linux LVM)
# create a phisical volume
sudo pvcreate /dev/sdb1
# create new volume group
@farnetani
farnetani / my.cnf
Created August 11, 2019 15:36 — forked from peerax/my.cnf
mySQL config file for ram 8GB
# my.cnf for TAKIS Server
# BEGIN CONFIG INFO
# DESCR: 8 GB RAM, InnoDB only, ACID, few connections, heavy queries
# TYPE: SYSTEM
# END CONFIG INFO
[client]
port = 7000
socket = /var/lib/mysql/mysql.sock
def carregarDadosCNPJ(**kwargs):
# r = requests.get('https://www.receitaws.com.br/v1/cnpj/{cnpj}'.format(cnpj=kwargs['cnpj']))
r = requests.get('https://www.receitaws.com.br/v1/cnpj/{cnpj}/days/10000'.format(cnpj=kwargs['cnpj']), headers = {'Authorization': 'Bearer token'})
if r.status_code == 200:
data = r.json()
if data.get('status', None) == 'ERROR':
return False, data.get('message', None)
@farnetani
farnetani / gist:914a0aea8b67064a2b5e5c00db1b616f
Last active July 21, 2018 13:35
Selecionar o row com clique em table - element.eleme.io
// https://codepen.io/anon/pen/WKRJGd?editors=1010
// https://codepen.io/anon/pen/WKRJGd
<div id="app">
<el-table style="width: 100%"
ref="minhaTabela"
:data="tableData3"
:row-style="getRowStyle"
@select="aoSelecionarUmRegistro"
@select-all="aoSelecionarTodos"
https://github.com/programadriano/node-mongo-redis/blob/master/src/repositories/personRepository.js
https://pt.stackoverflow.com/users/227/utluiz
https://pt.stackoverflow.com/questions/12927/qual-a-diferen%C3%A7a-entre-dao-e-repository
https://github.com/bookshelf/bookshelf/wiki/Plugin:-Pagination
https://github.com/jcdesimp/express-mvc-starter/blob/master/app/controllers/car.js
<!-- AUTO-GENERATED-CONTENT:START (DIRTREE:dir=./src&depth=2&onlyDirs=true) -->
<!-- AUTO-GENERATED-CONTENT:END -->
“scripts”: {
 “atualizar-diretorios”: “node ./doc-directory-create.js”
}
## Estrutura de diretórios
<!-- AUTO-GENERATED-CONTENT:START (DIRTREE:dir=./&onlyDirs=true) -->
<!-- AUTO-GENERATED-CONTENT:END -->
## Estrutura de diretórios e arquivos
<!-- AUTO-GENERATED-CONTENT:START (DIRTREE:dir=./) -->
<!-- AUTO-GENERATED-CONTENT:END -->