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 / ruff.toml
Last active August 18, 2026 16:08
Ruff settings for Python projects
# File: ruff.toml
#
# Description: Configuration for Ruff (linter/formatter).
#
# Usage Options:
# 1. PROJECT: Place in the root directory of your Python project to apply these settings locally to that specific project.
#
# 2. GLOBAL FALLBACK: Place in your global configuration directory to apply as a system-wide default for all projects:
# - Linux/macOS: ~/.config/ruff/ruff.toml
# - Windows: %USERPROFILE%\.config\ruff\ruff.toml
@rubenhortas
rubenhortas / nlayer_overview.md
Created March 14, 2026 11:53
N-Layer architecture overview

N-Layer architecture overview

N-Layer (or Multi-Tier) architecture is a software architectural pattern where responsibilities are separated into distinct logical layers. This promotes separation of concerns, making the application easier to maintain, scale, and test.

1. Presentation Layer (UI)

The top-most level of the application. Its primary responsibility is to handle the interaction between the user and the software.

@rubenhortas
rubenhortas / .clang-format
Last active March 31, 2026 18:21
Standard C style rules
# Apply to project: Place in the project root directory
# Apply globally: Place in ~/
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 120
IndentWidth: 4
TabWidth: 4
PointerAlignment: Right
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
@rubenhortas
rubenhortas / steven_black_hosts_updater.py
Last active August 18, 2026 13:59
Steven Black Hosts Updater
#!/usr/bin/env python3
"""
Steven Black Hosts Updater
This script automates the process of updating the system's hosts file using
the curated lists provided by Steven Black in https://github.com/StevenBlack/hosts
Requirements:
1. A Steven Black hosts file in /etc/hosts
@rubenhortas
rubenhortas / pyproject.toml
Last active August 18, 2026 16:09
Ruff and basedpyright rules for python projects
# File: pyproject.toml
#
# Description: Project-specific configuration shared with your team.
# Contains settings for both Ruff (linter/formatter) and Basedpyright (type checker).
#
# Location: Place in the ROOT directory of your Python project.
#
[tool.ruff]
line-length = 120
@rubenhortas
rubenhortas / show_renamer.py
Last active August 18, 2026 17:06
Utility to normalize show filenames
#!/usr/bin/env python3
"""
Show Renamer: A utility to normalize show filenames.
This script automates the tedious process of renaming video files from messy
tracker formats (e.g., 'Show.Name.S01E01.720p.x264-Group.mkv') into a clean,
standardized structure (e.g., 'Show Name S01E01.mkv').
KEY FEATURES:
@rubenhortas
rubenhortas / gnu_linux_console_shortcuts_cheatsheet.md
Last active February 15, 2026 00:42
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 August 17, 2026 18:26
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 / newskill_pyros_keyboard_cheatsheet.md
Last active March 14, 2026 21:06
New Skill Pyros 60% keyboard cheatsheet

NewSkill Pyros 60% keyboard cheatsheet

Keyboard combinations (or shortcuts) for the NewSkill 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 17, 2026 21:07
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
"""