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
| #!/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
| <?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
| 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 | |
| declare(strict_types=1); | |
| /** | |
| * Nextcloud - Social Support | |
| * | |
| * This file is licensed under the Affero General Public License version 3 or | |
| * later. See the COPYING file. |
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
| CREATE TABLE users ( | |
| username VARCHAR(255) NOT NULL, | |
| password VARCHART(255) NOT NULL, -- bcrypt, column width is not optimized | |
| realm VARCHAR(255) NOT NULL DEFAULT 'rikmeijer.nl', | |
| PRIMARY KEY (username), | |
| UNIQUE (username, realm) | |
| ); |
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 | |
| /usr/bin/find /var/backups/mysql/* -mtime +7 -exec rm {} \; | |
| for DB in $(mysql -e 'show databases' -s --skip-column-names); do | |
| if [ "$DB" = "information_schema" ] | |
| then | |
| echo Skipping $DB | |
| continue | |
| fi | |
| echo -n Dumping $DB... | |
| /usr/bin/mysqldump --add-drop-database --add-drop-table --single-transaction --routines --triggers $DB | gzip > "/var/backups/mysql/$DB-$(date '+%Y%m%e').sql.gz"; |
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
| c4820dc0c242e7456a1e31ca466c815829bc85235eed13c708f20d961d1fec7ecc039aaa4ade427cf46352702ef3147c1be546fc46a3e9aa7d4e690ae178dd18 |
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
| package PROG4_WK4b; | |
| import javafx.application.Application; | |
| import javafx.concurrent.Task; | |
| import javafx.scene.Scene; | |
| import javafx.scene.control.ProgressBar; | |
| import javafx.scene.layout.BorderPane; | |
| import javafx.stage.Stage; | |
| public class Main extends Application { |
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
| package PROG4_WK3b; | |
| import javafx.application.Application; | |
| import javafx.event.EventHandler; | |
| import javafx.stage.Stage; | |
| import javafx.scene.Scene; | |
| import javafx.scene.input.MouseEvent; | |
| import javafx.scene.layout.BorderPane; | |
| import javafx.scene.layout.GridPane; |
NewerOlder