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!
  • 08:32 (UTC +10:00)
View GitHub Profile
@n0ts
n0ts / remote_bash.sh
Created May 1, 2014 06:35
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2
@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
Indexer Membership Status API URL Software API Hits/Day NZB Grabs/Day Retention Account Duration Counter Reset Counter Reset
NZB.cat Free https://nzb.cat nZEDb 500 50 60 Days
NZB.cat VIP https://nzb.cat nZEDb 5,000 1,000 Lifetime
Oznzb.com Freeloader https://api.oznzb.com Newsnab+ 5 5 Rolling Counter Rolling Co
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active November 3, 2024 22:54
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@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
@Oppodelldog
Oppodelldog / inner.sh
Created November 27, 2019 20:29
shell - nested traps
#!/bin/bash
err_report() {
echo "error in inner script: $(caller):$1"
}
trap 'err_report $LINENO' ERR
echo "INNER SCRIPT"