This file contains hidden or 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
| Verifying that I control the following Nostr public key: npub1efz8l77esdtpw6l359sjvakm7azvyv6mkuxphjdk3vfzkgxkatrqlpf9s4 |
This file contains hidden or 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 | |
| /** | |
| * This script uses "sabre/dav" Client to make webdav requests to a Nextcloud instance. | |
| * The "nextcloud-checksum-update" option is a, somewhat, hidden feature in the Sabre Connector (Checksum Update Plugin) | |
| * https://github.com/nextcloud/server/blob/master/apps/dav/lib/Connector/Sabre/ChecksumUpdatePlugin.php | |
| * | |
| * The basic flow is: | |
| * - PROPFIND on /remote.php/dav/Photos (explicitly asking for '{http://owncloud.org/ns}checksums' property) | |
| * - use the proper hash from the response |
This file contains hidden or 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
| #!/bash/sh | |
| for dir in ./*/ | |
| do | |
| dir=${dir%*/} | |
| album="${dir##*/}" | |
| docker run -it -d --name "upload_${album//[^0-9a-zA-Z]/_}" -v "$(pwd)":/import:ro -e IMMICH_INSTANCE_URL=https://<IMMICH_DOMAIN>/api -e IMMICH_API_KEY=API_KEY_HERE ghcr.io/immich-app/immich-cli:latest upload --album --concurrency 5 --recursive ${album} | |
| done |
This file contains hidden or 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/sh | |
| # Based on instruction at https://nextcloudappstore.readthedocs.io/en/latest/developer.html | |
| # Call ./generate-nextcloud-release <APP_ID> | |
| # Assuming app is in folder <APP_ID> | |
| # and assuming signing key is in ~/.nextcloud/certificates/<APP_ID>.key | |
| tar --exclude=".git*" -czf $1.tar.gz noxtr | |
| openssl dgst -sha512 -sign ~/.nextcloud/certificates/$1.key $1.tar.gz | openssl base64 |
This file contains hidden or 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 | |
| $uri = "https://immich.example.org/api"; | |
| $api_key = "<API_KEY_HERE>"; | |
| $request = function(string $method, string $endpoint, mixed $body = null, array $headers = []) use ($uri, $api_key) { | |
| $curl = curl_init($uri . $endpoint); | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($curl, CURLOPT_HEADER, true); |
This file contains hidden or 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 | |
| // composer require nostriphant/client | |
| require __DIR__ . '/vendor/autoload.php'; | |
| $nostrdeck_backup_file = 'nostr-backup-XXX.json'; | |
| $target_relays = ['wss://1.2.3.4']; | |
| $events = \nostriphant\NIP01\Nostr::decode(file_get_contents($nostrdesk_backup_file)); | |
| $nostr = \nostriphant\Client\Client::connectToUrl(...$target_relays); | |
| $nostr(fn(callable $send_event, callable $subscribe) => nostriphant\Functional\Iterator::walk($events, fn($event, $index) => $send_event(new \nostriphant\NIP01\Event(...$event), fn($accepted, $reason) => var_dump($index, $accepted, $reason)))); |
This file contains hidden or 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 | |
| // simple script to fix some data issues on my Immich installation | |
| $uri = "https://immich.example.org"; | |
| $api_key = "ApIk3Y"; | |
| $request = function(string $method, string $endpoint, mixed $body = null, array $headers = []) use ($uri, $api_key) { | |
| $curl = curl_init($uri . $endpoint); | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
OlderNewer