| Keys | Action |
|---|---|
| TAB CTRL+i | Autocomplete |
| CTRL+u | Delete everything from the cursor position to the beginning of the line |
| CTRL+k | Delete everything from the cursor position to the end of the line |
| CTRL+w | Delete the word before the cursor |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| """ | |
| A very lightweight Python script to download torrent files (less than X days old) from the https://showrss.info feed. | |
| Requirements: | |
| - feedparser | |
| """ |
This file contains hidden or 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
| # Optimized rTorrent configuration template with automated directory provisioning, | |
| # disk space monitoring, ratio control (for public and private trackers) | |
| # and handling of .torrent and [in]complete downloaded files. | |
| # | |
| # Automations: | |
| # | |
| # - Disk management | |
| # | |
| # - Create instance directories | |
| # - Set restrictive file permissions |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Bash script to find users who have never logged into the system | |
| while IFS=: read -r username _ ; do | |
| last_login=$(lastlog -u "$username" | tail -n 1 | awk '{print $5}') | |
| if [[ -z "$last_login" ]]; then | |
| echo "User \"""$username\""" has never logged in" | |
| fi |
This file contains hidden or 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
| /* | |
| * Process arguments spoofing in GNU/Linux. | |
| * | |
| * Hide program arguments by overwriting them with null. | |
| * | |
| * You can read my full post here: https://rubenhortas.github.io/posts/process-argument-spoofing-gnu-linux/ | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> |
This file contains hidden or 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
| alias urlencode='python3 -c "import sys, urllib.parse as parse; print(parse.quote_plus(sys.argv[1]))"' | |
| alias urldecode='python3 -c "import sys, urllib.parse as parse; print(parse.unquote_plus(sys.argv[1]))"' | |
| alias b64urlencode='python3 -c "import sys, base64; print(base64.urlsafe_b64encode(bytes(sys.argv[1], \"UTF-8\")).decode(\"UTF-8\"))"' | |
| alias b64urldecode='python3 -c "import sys, base64; print(base64.urlsafe_b64decode(bytes(sys.argv[1], \"UTF-8\")).decode(\"UTF-8\"))"' |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Encodes/decodes a string to/from base64url. | |
| print_help() { | |
| echo "Usage: $(basename "$0") [-d] STRING" | |
| echo | |
| echo "Without -d encodes the string to base64url." | |
| echo | |
| echo " -d decodes the string from base64url (or base64)" |
NewerOlder