Last active
June 4, 2024 22:32
-
-
Save atb00ker/aad7fb8e718f23f01e07798a6c6c2364 to your computer and use it in GitHub Desktop.
Collection of snippets i find myself using every once in a while
This file contains 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
snippet-active : commands I keep forgetting | |
snippets-archive : commands I used to forget | |
snippets-backup : commands that might be useful again someday |
This file contains 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
- git remote rm origin | |
- git remote prune origin | |
- tar -xvzf file.tar.gz | |
- ln -s <path/to/real/file-or-folder> <symlink path> | |
- stat <file-name> | |
- grep -Hrn "<<<<<<< HEAD" | |
- document.querySelector('video').playbackRate = 1.5; | |
- sudo dd bs=4M if=/path/to/iso of=/dev/sdb status=progress && sync | |
- git log --all --decorate --oneline --graph | |
- git branch -dr <remote>/<branch> | |
- netcat -u -v -w2 <IP> <Port> | |
- docker run -d --user $UID:$GID \ | |
-p 8080:8080 -p 6881:6881/tcp -p 6881:6881/udp \ | |
-v /home/path/config:/config:rw \ | |
-v /home/path/torrents:/torrents:rw \ | |
-v /home/path/downloads:/downloads:rw \ | |
wernight/qbittorrent | |
SSH Options | |
- sshuttle -e 'ssh -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' --dns -r <user>@<ip> 0/0 | |
- pkill sshuttle | |
- sudo kill -9 $(sudo lsof -t -i:9999) | |
- ssh -D 9999 -f -C -N <user>@<ip> | |
- export http_proxy=socks5://127.0.0.1:9999 https_proxy=socks5://127.0.0.1:9999 ALL_PROXY=socks5://127.0.0.1:9999 | |
# GPG | |
gpg --symmetric --output <output> <input> | |
gpg --decrypt --output <output> <input> |
This file contains 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
- Ansible: | |
ansible-playbook -i hosts playbook.yml -u root -k --become -K | |
- SSH known_hosts: | |
for i in $(seq 34 48); do ssh-keyscan -H 192.168.56.$i >> ~/.ssh/known_hosts; done | |
for i in $(seq 34 48); do ssh-keygen -R 192.168.56.$i; done | |
sshpass -p "root" ssh -o StrictHostKeyChecking=no root@192.168.56.43 | |
- GZIP: | |
tar -cf texfiles.tar | |
gzip -9 textfiles.tar | |
gunzip texfiles.tar.gz | |
tar -xf texfiles.tar |
This file contains 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
echo 0 > /sys/class/backlight/intel_backlight/brightness |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment