Skip to content

Instantly share code, notes, and snippets.

View miko007's full-sized avatar

Michael Ochmann miko007

View GitHub Profile
@miko007
miko007 / unsplash.php
Created October 23, 2024 12:36
Unsplash Random Photo replacement
<?php declare(strict_types=1);
###############################################################################
# #
# Maschinendeck Unsplash wrapper #
# #
###############################################################################
/**
* This script provides a replacement for the old
* `https://source.unsplash.com/random` endpoint, which is no longer available
@miko007
miko007 / cleanup.php
Created April 6, 2022 09:43
A cleanup script to remove orphaned pads from an Etherpad Lite installation
#!/usr/bin/env php
<?php declare(strict_types=1);
function msg(string $message) : void {
echo "$message\n";
}
function error(string $message, int $code = 1) : void {
msg("[ERROR] $message");
exit($code);