Skip to content

Instantly share code, notes, and snippets.

@gist-github
gist-github / aria2.daemon
Created February 11, 2020 14:44 — forked from h0tw1r3/aria2.daemon
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=trunc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
@gist-github
gist-github / pi-cpu-stress.sh
Created December 27, 2020 23:29 — forked from geerlingguy/pi-cpu-stress.sh
Raspberry Pi CPU temperature and throttling test script
#!/bin/bash
# Raspberry Pi stress CPU temperature measurement script.
#
# Download this script (e.g. with wget) and give it execute permissions (chmod +x).
# Then run it with ./pi-cpu-stress.sh
# Variables.
test_run=1
test_results_file="/home/${USER}/cpu_temp_$test_run.log"
stress_length="10m"
@gist-github
gist-github / chroot-to-pi.sh
Created December 30, 2020 22:09 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@gist-github
gist-github / confirm.png
Last active February 1, 2022 15:46 — forked from triangletodd/README.md
k3s in LXC on Proxmox
confirm.png
@gist-github
gist-github / repo-rinse.sh
Created January 18, 2022 15:49 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@gist-github
gist-github / delete_git_submodule.md
Created January 20, 2022 22:26 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@gist-github
gist-github / gist:b9d8a9f5d6ba4a29e390f6300f140a26
Created February 18, 2022 16:09 — forked from shsteimer/gist:7257245
Tip to delete tags by pattern
#delete all the remote tags with the pattern your looking for, ie. DEV-
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/%
#delete all your local tags
git tag | xargs -n 1 -i% git tag -d %
#fetch the remote tags which still remain
git fetch