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 | |
# | |
# 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
/** | |
* 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" |
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
<?php | |
/** | |
* Spider Struct - by Allan.Brazute | |
* Mirror files from some remote place, based on a source directory structure, to a distination directory | |
* | |
* Usage: spiderstruct.php /local_src_structure_path/ /output_path/ http://base_url/ | |
*/ | |
$localSrc = (isset($argv[1]) && $argv[1])? $argv[1] : ''; | |
$localDst = (isset($argv[2]) && $argv[2])? $argv[2] : ''; |
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 | |
## | |
# BORG Backup | |
# | |
# [1.0] 2014-10-30 :: Allan Brazute | |
# - Assimilation | |
# | |
# All hosts need to have ssh and borg | |
# Backup Repository host may also need a compress tool like pigz |
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. |
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" |
NewerOlder