Skip to content

Instantly share code, notes, and snippets.

@roydejong
roydejong / eu_codes.php
Created May 23, 2017 13:12
PHP: Array of EU ISO country codes (may 2017)
$codeList = [
"BE", "BG", "CZ", "DK", "DE", "EE", "IE", "EL", "ES", "FR", "HR", "IT", "CY",
"LV", "LT", "LU", "HU", "MT", "NL", "AT", "PL", "PT", "RO", "SI", "SK", "FI",
"SE", "UK"
];
@roydejong
roydejong / gitlab2nas.php
Last active February 12, 2024 03:10
Script: Backup all GitLab repositories to Synology NAS
<?php
// This script will back up all your GitLab repositories to a specified location.
// I recommend creating a seperate GitLab user for backups.
// You'll need to generate a personal access token for that user with API access (in GitLab).
// Next, generate a SSH keypair for the NAS user and attach it to the GitLab user.
// Finally, create a scheduled task in your NAS config to run this script: "php /some/location/git2nas.php"
// Config -- start