Skip to content

Instantly share code, notes, and snippets.

View almostlight's full-sized avatar

Łukasz almostlight

View GitHub Profile
@rafaelpadovezi
rafaelpadovezi / git-bash-fish.md
Last active October 2, 2025 10:57
Using fish shell with git bash on windows

Using fish shell with git bash on windows

To install fish shell on windows the options are:

  • Cygwin
  • WSL
  • MSYS2

Since git bash is based on MSYS2 it seems a good fit to install fish. The problem is that git bash is a lightweight version of MSYS2 which does not include pacman as a package management, used to install fish.

This OS thread has great suggestions on how to solve this problem including using the full MSYS2. But the best solution for me was this answer by Michael Chen which installs pacman on git bash.

@williamd1k0
williamd1k0 / linux
Created July 4, 2019 20:02
The GNU/Linux interjection
#!/usr/bin/sh
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "usage: linux [-f/--full]
The GNU/Linux interjection speech is copypasta that was cut together based on Stallman's rant and other pieces of his writings over the years.
optional arguments:
-h, --help show this help message and exit
-f, --full show the entire interjection"
exit
@heroheman
heroheman / ranger-cheatsheet.md
Last active November 1, 2025 09:37
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@lava
lava / hello_world.md
Last active October 19, 2025 12:47
Hello, world: Deep analysis of a shallow program.

Hello, world!

Please explain in detail what will happen if the following program is executed:

#include <iostream>

int main() {
    std::cout << "Hello, world!" << std::endl;
}
@a-c-t-i-n-i-u-m
a-c-t-i-n-i-u-m / freenom.com.ddns.sh
Created July 7, 2015 12:07
Dynamic DNS support shell script for freenom.com
#!/bin/bash
# settings
# Login information of freenom.com
freenom_email="main@address"
freenom_passwd="pswd"
# Open DNS management page in your browser.
# URL vs settings:
# https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id}
freenom_domain_name="domain.name"
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git