Skip to content

Instantly share code, notes, and snippets.

View nicolaymh's full-sized avatar
:octocat:
Learning, coding, and growing as a developer

Nicolay Moreno nicolaymh

:octocat:
Learning, coding, and growing as a developer
View GitHub Profile
@nicolaymh
nicolaymh / Mastering ripgrep for Efficient File Searching
Created April 28, 2025 17:23
A complete guide to install and use ripgrep (rg) for fast and efficient text searches in files and directories.
# Step 1: Install ripgrep
# First, update your package list to make sure everything is up to date.
sudo apt update
# Install ripgrep using the package manager.
sudo apt install ripgrep
# Step 2: Verify installation
# Check that ripgrep was installed successfully by running:
rg --version
@nicolaymh
nicolaymh / Mastering fzf for Interactive File Searching
Created April 28, 2025 17:21
A guide to install and use fzf for fast and interactive file and directory searching within the terminal.
# Step 1: Install fzf
sudo apt update
sudo apt install fzf
# Step 1: Install fzf
# Update your package list to ensure everything is up-to-date.
sudo apt update
# Install fzf package.
sudo apt install fzf
@nicolaymh
nicolaymh / Enable password feedback (*) in sudo on Linux
Last active April 28, 2025 16:27
Enable password feedback (*) in sudo on Linux
# Enable '*' feedback when typing the password in sudo (Linux - Professional Setup)
# Create a configuration file in /etc/sudoers.d/ to activate pwfeedback
echo "Defaults pwfeedback" | sudo tee /etc/sudoers.d/pwfeedback
# (Verify that the file was created correctly)
sudo cat /etc/sudoers.d/pwfeedback
# (If sudo does not ask for the password because of an active session, reset it)
sudo -k
@nicolaymh
nicolaymh / envs.ts
Last active September 5, 2024 21:11
Common setup for validating environment variables with Joi and TypeScript
import 'dotenv/config'; // Load environment variables from a .env file
import * as joi from 'joi'; // Import Joi for schema validation
// Define an interface for type safety
interface EnvVars {
PORT: number;
}
// Define the validation schema for environment variables
const envsSchema = joi.object({