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!
  • 11:51 (UTC +10:00)
View GitHub Profile
@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 / 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 / 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: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:f0a756e33d82ede0f2f7de1b0ecdb511
Created October 9, 2020 03:45
find unused BASH functions in script
#!/usr/bin/env bash
target_pathfile="$1"
target_func=''
for target_func in $(grep '()$' "$target_pathfile" | grep -v '=\|\$' | sed 's|()||g'); do
[[ $(grep -ow "$target_func" < "$target_pathfile" | wc -l) -eq 1 ]] && echo "$target_func()"
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 / gist:947404ecd6efe48d763bf5c4b3761665
Created January 3, 2021 03:09
Kate highlighted keywords
# These demonstrate available words for syntax highlighting on Kate (makes it easier to pick a word that stands-out):
# ALERT ATTENTION DANGER HACK SECURITY
# BUG FIXME DEPRECATED TASK TODO TBD WARNING CAUTION NOLINT
# ### NOTE NOTICE TEST TESTING
@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