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
| #!/usr/bin/bash | |
| # mpdsimilar.sh — Fetches similar artist tracks via Last.fm and adds them to the MPD queue. | |
| # | |
| # Usage: | |
| # mpdsimilar.sh [OPTIONS] | |
| # | |
| # Options: | |
| # -c, --current Add similar artist tracks for the currently playing track. | |
| # Crops the playlist to only the current track first. | |
| # -a, --all Add similar artist tracks for every track already in the queue. |
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/bash | |
| DATE=$(date '+%Y-%m-%d-%H-%M-%S') | |
| BACKUP_NAME=kodi-backup-$DATE.tar.gz | |
| TEMP_BACKUP_LOCATION=/tmp/backups/kodi | |
| BACKUP_DIR=/home/pi/.kodi | |
| ARCHIVE_DIR=/media/routher_share/Backup/kodi | |
| mkdir -pv $TEMP_BACKUP_LOCATION | |
| chmod 777 $TEMP_BACKUP_LOCATION |
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
| #!/usr/bin/env bash | |
| # _ __ _ _ | |
| # | |/ /___ __| (_) | |
| # | ' </ _ \/ _` | | | |
| # |_|\_\___/\__,_|_| | |
| # | |
| ######################################### | |
| # Kodi video "poster" automatic generator |
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
| #!/usr/bin/env bash | |
| IFS=$'\n' BLAU_OUTPUT=( $(echo "exit" |bluetoothctl |grep Device |cat -A |cut -c59-) ) | |
| lines=${#BLAU_OUTPUT[@]} | |
| for i in ${BLAU_OUTPUT[@]}; do addr+=(${i:0:17}); name+=(${i:18}); done | |
| SKEL='pcm.PCMNAME {\n | |
| type plug\n | |
| slave.pcm {\n |
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
| #!/usr/bin/env bash | |
| # Update library | |
| curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:8080/jsonrpc | |
| # Clean library | |
| curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:8080/jsonrpc | |
| # Export library to separate files: | |
| curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Export", "params": { "options": { "overwrite": false, "actorthumbs": false, "images": true } }, "id": 1 }' -H 'content-type: application/json;' http://localhost:8080/jsonrpc |
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/bash | |
| IFS= read -rp 'Server name: ' server_name < /dev/tty | |
| IFS= read -rp 'Username: ' username < /dev/tty | |
| IFS= read -rsp 'Password: ' password < /dev/tty | |
| echo 1>&2 | |
| password_encoded=$(urlencode -bc $' "#$%&\'*+,/:;<=>?@[\\]^`{|}~' <<< "$password") | |
| tee "$HOME/.kodi/userdata/mediasources.xml" <<EOF | |
| <mediasources> |
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 | |
| add-apt-repository ppa:team-xbmc/ppa | |
| apt update ; apt install kodi -y | |
| #keep reading https://launchpad.net/~team-xbmc/+archive/ubuntu/ppa |
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/bash | |
| # prepare a Ubuntu server minimal installation with working network using network manager | |
| # this works on raspbian, too | |
| apt-get install software-properties-common -y | |
| # install KODI | |
| add-apt-repository ppa:team-xbmc/ppa -y | |
| apt-get update && apt-get install -y kodi xserver-xorg xinit dbus-x11 alsa-utils avahi-daemon |
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 USER 'dbbackup'@'localhost' IDENTIFIED BY '***'; | |
| GRANT SELECT , | |
| RELOAD , | |
| FILE , | |
| SUPER , | |
| LOCK TABLES , | |
| SHOW VIEW ON * . * TO 'dbbackup'@'localhost' IDENTIFIED BY '***' | |
| WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; |
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 DATABAESE MYNEWDB; | |
| CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
| GRANT ALL PRIVILEGES ON MYNEWDB.* TO 'newuser'@'localhost'; | |
| FLUSH PRIVILEGES; |
NewerOlder