This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `municipios` ( | |
`id` int(7) NOT NULL, | |
`estado` varchar(19) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`uf` char(2) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`municipio` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
INSERT INTO `municipios` (`id`, `estado`, `uf`, `municipio`) VALUES | |
(1100015, 'Rondônia', 'RO', 'Alta Floresta D\'Oeste'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
["Acre", "AC"], | |
["Alagoas", "AL"], | |
["Amazonas", "AM"], | |
["Amapá", "AP"], | |
["Bahia", "BA"], | |
["Ceará", "CE"], | |
["Distrito Federal", "DF"], | |
["Espírito Santo", "ES"], | |
["Goiás", "GO"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
CREATE TABLE `cfop` ( | |
`id` char(4) COLLATE utf8_unicode_ci NOT NULL, | |
`descricao` varchar(200) COLLATE utf8_unicode_ci NOT NULL, | |
`aplicacao` varchar(530) COLLATE utf8_unicode_ci DEFAULT NULL, | |
PRIMARY KEY (`id`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash - | |
### | |
# Simple ec2-automate-backup runner | |
# Author: Allan Brazute | |
### | |
# Setup | |
BKP_DEVICES_PATHS="/var/lib/mongo /var/lib/mysql" | |
BKP_KEEP_DAYS=7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Visual Studio Code Arduino Tasks.json | |
// Author: Allan Brazute @ SpotApp | |
// | |
// ${workspaceRoot}: the root folder of the team | |
// ${file}: the current opened file | |
// ${fileBasename}: the current opened file's basename | |
// ${fileDirname}: the current opened file's dirname | |
// ${fileExtname}: the current opened file's extension | |
// ${cwd}: the current working directory of the spawned process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Funções de validação de Inscrição Estadual | |
* | |
* Fórmulas dos Fiscos das 27 UF's no Site do SINTEGRA: | |
* http://www.sintegra.gov.br/insc_est.html | |
*/ | |
/** | |
* Checa Inscrição Estadual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# sync2incron - Script for incron to add or remove entries from an incrontab file | |
# | |
# Usage: | |
# | |
# - Add it to incron as something like: | |
# /root/path/to/monitor IN_CREATE,IN_DELETE /path/to/sync2incron.sh $% /etc/incron.d/myincrontab $@/$# IN_CLOSE_WRITE myscript $$@/$$# | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh USER@REMOTE_SOURCE_SERVER 'mysqldump -uUSER -pPASSWORD --databases MYDATABASE | lbzip2' | lbunzip2 | pv -s `ssh USER@REMOTE_SOURCE_SERVER 'mysql -uUSER -pPASSWORD -e "SELECT ROUND(((SUM(DATA_LENGTH)*2)+SUM(INDEX_LENGTH))/3) B FROM information_schema.tables WHERE table_schema = \"MYDATABASE\";"| tail -n1'` |mysql -uUSER -pPASSWORD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Issue a LetsEncrypt SSL certificate using acme.sh | |
# | |
# ISPConfig 3 preparation: | |
# Enable the SSL option and Add a self-signed certificate on SSL tab within Sites/Domains to create the needed configurations. | |
# | |
if [ -z "$*" ]; then | |
printf "\n issue-cert.sh domain.com \n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Backmark.sh | |
# | |
# Will create a pool of binary and text files with random content, | |
# duplicate then in two directories and backup it twice | |
# with multiple tools to compare their time and size. | |
# | |
# Simple like that. |
OlderNewer