Skip to content

Instantly share code, notes, and snippets.

@ammarshah
ammarshah / manage_multiple_ruby_versions_with_rbenv_in_ubuntu.md
Last active September 11, 2024 04:27
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.3.5
@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 October 11, 2024 13:44
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