Skip to content

Instantly share code, notes, and snippets.

View ammarshah's full-sized avatar

Ammar Shah ammarshah

View GitHub Profile
@ammarshah
ammarshah / manage_multiple_ruby_versions_with_rbenv_in_fedora.md
Created August 15, 2025 17:59
Setup rbenv on Fedora 42 and use .ruby-version file to install the version your project requires

How to setup rbenv on Fedora 42

This guide will not install a specific Ruby version you want, although, it will setup rbenv so you can manage multiple Ruby versions.

It assumes that the project that requires a specific Ruby version has a file .ruby-version in the root of the project. So, simply running rbenv install from project root directory will use the version specified in that file and install it.

But if you still want to install a specific version of Ruby without using .ruby-version file, you can do so using:

$ rbenv install 3.4.1
@ammarshah
ammarshah / transfer_data_between_fedora42_and_windows10.md
Last active August 15, 2025 12:39
Transfer Data between Two Laptops (Fedora 42 and Windows 10) using a LAN Cable and FileZilla

Transfer Data between Two Laptops (Fedora 42 and Windows 10) using a LAN Cable and FileZilla

Transferring files between a Fedora 42 machine and a Windows 10 machine over a LAN using FileZilla involves a few key steps. The general process is to set up one machine as an FTP server (Fedora) and the other as an FTP client (Windows). Here's how you can do that:

1. Connect Both Computers via LAN Cable

  • Plug one end of the LAN cable into the Ethernet port of the first laptop.
  • Plug the other end of the LAN cable into the Ethernet port of the second laptop.

2. Configure Network Settings

@ammarshah
ammarshah / install_postgresql_on_fedora.md
Last active August 13, 2025 17:36
Install PostgreSQL 17 on Fedora 42

Install PostgreSQL 17 on Fedora 42

1. Installation

Follow the PostgreSQL Installation section from the official Fedora Docs but make sure to specify the right version (i.e. 17) in the first command like below:

sudo dnf install postgresql17-server postgresql17-contrib

The rest of the commands are the same:

@ammarshah
ammarshah / install_postgresql_on_ubuntu.md
Last active August 18, 2025 14:57
Install PostgreSQL 17 on Ubuntu 24.04

Install PostgreSQL 17 on Ubuntu 24.04

1. Import the repository signing key:

$ sudo apt install curl ca-certificates
$ sudo install -d /usr/share/postgresql-common/pgdg
$ sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc

2. Create the repository configuration file:

@ammarshah
ammarshah / manage_multiple_ruby_versions_with_rbenv_in_ubuntu.md
Last active January 16, 2025 14:32
Setup rbenv on Ubuntu 24.04 and use .ruby-version file to install the version your project requires

How to setup rbenv on Ubuntu 24.04

This guide will not install a specific Ruby version you want, although, it will setup rbenv so you can manage multiple Ruby versions.

It assumes that the project that requires a specific Ruby version has a file .ruby-version in the root of the project. So, simply running rbenv install from project root directory will use the version specified in that file and install it.

But if you still want to install a specific version of Ruby without using .ruby-version file, you can do so using:

$ rbenv install 3.4.1
@ammarshah
ammarshah / git_rebase_with_filter_repo.md
Created October 16, 2023 15:21
Remove commit(s) from git repository using rebase while keeping the original commit dates

Example Usage of git-rebase with git-filter-branch and git-filter-repo

You can rewrite commits using either git-filter-branch or git-filter-repo but the latter one is recommended. See why.

1. Check Logs

There are two types of dates in a git commit: AuthorDate and CommitDate.

When you run git log, the date you see with every commit is the AuthorDate while GitHub repository shows the CommitDate.

@ammarshah
ammarshah / all_email_provider_domains.txt
Last active August 27, 2025 03:07
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org