Skip to content

Instantly share code, notes, and snippets.

@CodeShakingSheep
CodeShakingSheep / nextcloud-deck-export-import.py
Last active May 14, 2024 10:55 — forked from svbergerem/nextcloud-deck-export-import.py
Nextcloud Deck Export/Import (Note that all comments will be created from the user account specified in the first lines of the script)
# You need to have the 'requests' module installed, see here: https://pypi.org/project/requests/
import requests
# Note regarding 2FA
# You can either disable 'Enforce 2FA' setting and disable '2FA'. Then you can just use your regular user password.
# Or you can just use an app password, e.g. named 'migration' which you can create in 'Personal settings' --> 'Security'. After successful migration you can delete the app password.
urlFrom = 'https://nextcloud.domainfrom.tld'
authFrom = ('username', 'user password or app password')
urlTo = 'https://nextcloud.domainto.tld'
@rickardrosen
rickardrosen / zfs-load-key.service
Created December 7, 2019 13:59
Load ZFS encryption keys: /etc/systemd/system/zfs-load-key.service
[Unit]
Description=Load encryption keys
DefaultDependencies=no
Before=zfs-mount.service
After=zfs-import.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bash -c '/usr/bin/zfs load-key -a'