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
/** | |
:: Adminer.org SQL Edit Fullscreen Bookmarklet :: | |
Add to your bookmarks using: https://bookmarkify.it/53844 | |
How to: Click the bookmark when editing a SQL command in Adminer. Press ESC to exit fullscreen. | |
*/ | |
var s = document.getElementsByClassName('sqlarea')[0]; | |
if (s) { | |
s.style.backgroundColor = window.getComputedStyle(document.body, null).getPropertyValue('background-color'); | |
s.requestFullscreen(); | |
} |
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
ENABLED=1 | |
PROC="sshd" | |
CMD=$PROC | |
if [ $ENABLED = 1 ] ; then | |
if pgrep -f $PROC >/dev/null ; then | |
echo "[$PROC is running]" | |
else | |
echo "[Starting $PROC...]" && $CMD && echo "[OK]" | |
fi |
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 | |
# | |
# Digital Ocean - Update DNS records with Droplets internal private IPs and hostname | |
# DO_upd_domain.sh: | |
# | |
# 2021-07-20 - v1.1 - By EthraZa <Allan Brazute> | |
# Add: Update only powers and --flush switch to recreate the domain | |
# | |
# 2021-07-15 - v1.0 - By EthraZa <Allan Brazute> | |
# |
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
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
/** | |
* Google Sheets script: function refreshFormula(aToResfresh) | |
* For each cell in the array, force refresh the containing formula. | |
* | |
* @param {Array} aToResfresh The array of cells with formula to force refresh. | |
* @return {Void} | |
*/ | |
function refreshFormula(aToResfresh = []) { | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(), | |
sheet = spreadsheet.getActiveSheet(), |
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
/** | |
* Google Sheets script: countCellsByBgColor(inputRange, colorReference, operation = 'count') | |
* For each cell in a range, with a given background color, count or sum it. | |
* | |
* @param {String} inputRange The range of cells to check for the background color. | |
* @param {String} colorReference The cell with the background color to count. | |
* @param {String} operation [count|sum] The operation to perform over selected range. | |
* @param {Int} eachRow The number of rows to jump to at each interaction loop. | |
* @param {Int} eachColumn The number of columns to jump to at each interaction loop. | |
* @return {Number} The number of cells with a matching background. |
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/sh | |
# Config | |
APPDIR="/tmp" | |
# Setup | |
HOOKS=$(basename "$0") | |
HOOKSDIR=$(dirname $(dirname "$0")) | |
HOOKSLOG="${HOOKSDIR}/${HOOKS}.log" |
NewerOlder