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'
@svbergerem
svbergerem / nextcloud-deck-export-import.py
Created June 24, 2020 09:50
Nextcloud Deck Export/Import
import requests
urlFrom = 'https://cloud.domainfrom.tld'
authFrom = ('username', 'password')
urlTo = 'https://nextcloud.domainto.tld'
authTo = ('username', 'password')
headers={'OCS-APIRequest': 'true', 'Content-Type': 'application/json'}
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@bheisig
bheisig / pulseaudio.md
Last active June 7, 2022 16:27
PulseAudio for Kodi, MPD and remote access on a Ubuntu host

Pulseaudio the hard way

After weeks of struggling how to setup PulseAudio properly on a server for concurrent audio sources I finally found a way. This is a little guide through the process.

Motivation

In my living room there is a little server machine for a lot of purposes. For example, it is connected to my A/V receiver (and obviously a TV) so I can use this machine for playing audio and video. My setup is the following:

  • Kodi for playing movies, series, and live TV (over DVB-T2)
@jasontbradshaw
jasontbradshaw / backup.bup
Last active December 28, 2021 12:56
A backup script using bup.
#!/usr/bin/env bash
# Strict mode (see: http://redsymbol.net/articles/unofficial-bash-strict-mode/).
set -euo pipefail
IFS=$'\n\t'
# We name the repository directory after the system's hostname and the current
# year/month. We include the year/month combo so our backup repository doesn't
# continue to grow forever, and we can manually delete old ones as necessary.
name="$(hostname)"
@jameshfisher
jameshfisher / How to make a private Gist public.md
Created January 5, 2014 16:31
How to make a private Gist public

Github provides no facility to do this via the UI. This is sad, because it would be extremely useful in order to draft something before publishing it. It would also be trivial for them to implement. Never mind; here's how to do it manually:

  1. Get the "Clone this Gist" text from the left-hand side of the private Gist, e.g. https://gist.github.com/b9cc265982870c091a1e.git, and extract the ID b9cc265982870c091a1e.
  2. Go to https://gist.github.com/ and create a dummy new public Gist.
  3. Get the "Clone this Gist" text from the left-hand side, e.g. https://gist.github.com/8270253.git, and extract the ID 8270253.
  4. git clone git@gist.github.com:b9cc265982870c091a1e tmp-dir && cd tmp-dir && git push -f git@gist.github.com:8270253.git