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 | |
# save password for db user "backup" in "~/.mylogin.cnf": | |
# mysql_config_editor set --login-path=local --host=localhost --user=backup --password | |
# permisions for backup user: Select table data, Show databases, Lock tables, Show View | |
# Base folder with backups | |
BASE_BACKUP_DIR="$HOME/.backup" | |
# Current date for folder name |
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 | |
$url = 'https://www.adminer.org/latest-mysql-en.php'; | |
$data = get_web_page($url); | |
if (isset($data['url'], $data['content'])) { | |
print_r($data['url']); | |
file_put_contents(basename($data['url']), $data['content']); |
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 | |
// download latest from https://www.adminer.org/latest-mysql-en.php | |
$files = scandir(__DIR__, SCANDIR_SORT_DESCENDING); | |
foreach ($files as $file) { | |
if ($file != '.' && $file != '..' && is_file(__DIR__ . '/' . $file) && strpos($file, 'adminer-') === 0 && substr($file, -4) === '.php') { | |
$f = str_replace('-mysql', '', $file); | |
if (is_file(__DIR__ . '/' . $f)) { | |
require __DIR__ . '/' . $f; | |
break; |
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
@echo off | |
REM Minify JS CSS SVG | |
REM npm install uglify-js -g | |
REM or | |
REM npm install terser -g | |
REM npm install clean-css-cli -g | |
REM npm install svgo -g |