Skip to content

Instantly share code, notes, and snippets.

@DavFount
DavFount / AutoDBBackup.ps1
Last active February 23, 2025 21:30
Auto-Backup MariaDB Database (Windows)
param(
[Parameter(Mandatory, HelpMessage = 'Path to Maria DB Installation. C:\Program Files\MariaDB 10.9')]
[string]$SQLPath,
[Parameter(Mandatory, HelpMessage = 'Location to store backups. C:\DBServerBackups')]
[string]$BackupDirectory,
[Parameter(Mandatory, HelpMessage = 'SQL User with access to your DB.')]
[string]$User,
[Parameter(Mandatory, HelpMessage = 'Password for the SQL User.')]
[string]$Pass,
[Parameter(HelpMessage = 'Port Number for your SQL Instance. Default: 3306')]
@EhsanCh
EhsanCh / fpm_get_status.php
Created February 19, 2023 10:54
PHP-FPM real-time status page (Single file without the need for web server configuration)
<?php
// Upload to private url or implement authorization...
if (isset($_GET["json"])) {
header("Content-type: application/json");
exit(json_encode( fpm_get_status() ));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--