Skip to content

Instantly share code, notes, and snippets.

View rubenhortas's full-sized avatar
:octocat:

Rubén Hortas rubenhortas

:octocat:
View GitHub Profile
@rubenhortas
rubenhortas / gnu_linux_console_shortcuts_cheatsheet.md
Created September 20, 2025 21:08
GNU/Linux console shortcuts cheatsheet

GNU/Linux console shortcuts

Editing

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
@rubenhortas
rubenhortas / git_cheatsheet.md
Last active November 23, 2025 18:29
git cheatsheet

git cheatsheet

User settings

Command Description
git config --global user.name $name Configure user name
git config --global user.email $mail Configure user email

Repository

@rubenhortas
rubenhortas / pyros_keyboard_cheatsheet.md
Last active September 20, 2025 20:30
New Skill Pyros 60% keyboard cheatsheet

New Skill Pyros 60% keyboard cheatsheet

Keyboard combinations (or shortcuts) for the New Skill Pyros 60% keyboard with spanish layout (es_ES).

Backlighting

Combination Action
Fn + ` Lower the brightness intensity
Fn + + Increase brightness intensity
@rubenhortas
rubenhortas / showtime.py
Last active August 31, 2025 09:48
A very lightweight Python script to download torrent files (less than X days old) from the https://showrss.info feed.
#!/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
"""
@rubenhortas
rubenhortas / .rtorrent.rc
Last active December 21, 2025 13:57
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
# 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
@rubenhortas
rubenhortas / inactive_users
Last active May 10, 2025 18:54
Bash script to find users who have never logged into the system
#!/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
@rubenhortas
rubenhortas / video_torrent_acronyms.md
Last active December 26, 2025 13:19
Video torrent acronyms (abbreviations or codes)

Video torrent acronyms

Video

Qualities

Low quality

Type Acronyms Meaning
@rubenhortas
rubenhortas / process_argument_spoofer_linux.c
Last active May 10, 2025 18:19
Process arguments spoofing in GNU/Linux
/*
* 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>
@rubenhortas
rubenhortas / urlencode_aliases
Last active September 28, 2024 16:24
Aliases to encode/decode strings to/from URL encoding using python3 (useful for CTFs)
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\"))"'
@rubenhortas
rubenhortas / base64url
Last active March 19, 2024 20:56
Bash script to encode and decode to base64url
#!/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)"