Skip to content

Instantly share code, notes, and snippets.

View OneCDOnly's full-sized avatar
🕶️
just geekin' out

OneCD OneCDOnly

🕶️
just geekin' out
  • ... there, behind that sofa!
  • 09:16 (UTC +10:00)
View GitHub Profile
@OneCDOnly
OneCDOnly / gist:648b77db6e54bdde4cdb9de4484d3ded
Last active September 14, 2020 22:29
build all QPKGs in current directory
for d in $(ls -d */); do cd $d; qbuild; cd ..; done;
@OneCDOnly
OneCDOnly / gist:45f1c618f5501ce2502b701d319199f7
Created September 18, 2017 08:11
load all screen sessions
for s in /tmp/screens/S-admin/*; do screen -r $(basename $s); done
@OneCDOnly
OneCDOnly / mimeapps.list
Created May 16, 2018 01:11
get 'baobab' to launch 'dolphin' instead of 'kfind' when opening folders in Debian 9.4 KDE
$HOME/.config/mimeapps.list
[Added Associations]
inode/directory=org.kde.dolphin.desktop;kde4-kfind.desktop;baobab.desktop;k4dirstat.desktop;
@OneCDOnly
OneCDOnly / gist:972755c5c5825ddd819cb2729a52b646
Last active September 15, 2020 04:48
Install 'google-drive-ocamlfuse' on Debian Stretch
sudo apt install software-properties-common dirmngr gnupg-agent
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AD5F235DF639B041
echo 'deb http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial main' | sudo tee /etc/apt/sources.list.d/alessandro-strada-ubuntu-ppa.list >/dev/null
sudo apt update
sudo apt install google-drive-ocamlfuse
@OneCDOnly
OneCDOnly / gist:13b1f85e4c23c65f5fc5fe7228e6e2b6
Created October 12, 2019 07:01
disable all installed QPKGs in QTS
packages=($(grep '^\[.*\]$' /etc/config/qpkg.conf | sed 's|[][]||g'))
for package in ${packages[*]}; do setcfg $package Enable FALSE -f /etc/config/qpkg.conf; done
@OneCDOnly
OneCDOnly / gist:cfbe704cad21f9185417f0d877dc4ddb
Created December 30, 2020 07:13
observational notes regarding 'Operating_Status' field values in [/etc/config/qpkg.conf]
QTS 4.5.1.1495
Example looks like:
"Operating_Status = 4:0:41309:0"
first field: 4 if QPKG has been stopped (using the qpkg_service utility) and 3 if started
second field: always 0
third field: NAS uptime in seconds when this entry was last updated
fourth field: always 0
@OneCDOnly
OneCDOnly / main.sh
Last active January 28, 2021 20:44
install jekyll on Debian Stretch to launch SAB wiki
sudo apt install gem ruby ruby-dev
sudo gem install jekyll bundler jekyll-redirect-from
cd ~/documents/SABnzbd\ wiki/sabnzbd.github.io/
jekyll serve
@OneCDOnly
OneCDOnly / gist:2ddf36908b17097e670c36367a68015a
Created November 27, 2021 02:01
notes regarding package signing in QTS 5
It turns out, to get rid of the "There is no digital signature" message in App Center, one only has to add a new entry to [/etc/config/nas_sign_qpkg.db] in the 'Certificate' table. Create a new record, with a "qpkg" 'Type', and 'QpkgName' as the internal QPKG name. Reload App Center. Done. No more warning. The QPKG is still not digitally signed but will also not display an error message in App Center.
@OneCDOnly
OneCDOnly / mod-qpkg-db.sh
Last active January 29, 2023 07:14
allow an unsigned QPKG to be installed and run in QTS while QTS is configured to disallow this
#!/usr/bin/env bash
# Copyright (C) 2023 OneCD - one.cd.only@gmail.com
# This script was written on 2023-01-29. It is intended as a proof-of-concept, rather than a hack.
# Modify the QTS App Center certificate dB, and add an unsigned QPKG as-if it were signed. It adds a QNAP generated certificate and digital signature to the database for the unsigned QPKG.
# Running the code below makes the target QPKG effectively "signed", and allows user to install and run this QPKG with the 'Allow installation of applications without a valid digital signature' App Center option unticked.
@OneCDOnly
OneCDOnly / gist:c6faa21b3f5ad53b43f16ac425b0f0e6
Created August 19, 2021 05:32
make all backup NZBs zero bytes
find /media/downloads/sabnzbd/nzb/backup/ -type f -name "*.nzb.*" ! -size 0 -print0 | xargs -0 truncate -s 0