Skip to content

Instantly share code, notes, and snippets.

@Shagshag
Shagshag / convert-gls-trackid.php
Created September 15, 2021 10:24
Convert GLS track ID to GLS reference
<?php
// based on https://stackoverflow.com/questions/10471991/convertions-between-decimal-and-base-36#10472259
function convertReferenceToTrackID($number) {
$offset = 2721109907456;
$base = 36;
$in = (string) ($number + $offset);
$out = '';
@Shagshag
Shagshag / backup.sh
Created October 20, 2021 09:20
Backup files and databases to FTP with space and old backup management
#!/bin/bash
### Configuration ###
### MYSQL ###
MUSER="" # MySQL user, must can execute 'show databases'
MPASS="" # MySQL password
MHOST="" # MySQL host
### FTP ###