Instantly share code, notes, and snippets.

View .gitconfig
lcm = !"git log -1 --pretty=%s"
lg = !"git lg1"
lg1 = !"git lg1-specific --all"
lg2 = !"git lg2-specific --all"
lg3 = !"git lg3-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
sudo apt install fish fonts-firacode fonts-powerline snapd git mariadb-client-10.1
curl -L | fish
omf install krisleech
sudo snap install brave --edge --classic

Dual-boot GNU/Linux↔Windows file sharing

You want to use the same files on different environment? Here is how to setup your Linux system.

It is strongly recommended to have a separate partition for every OS you want to have and another partition on which you want to store your data. If you are using UNIX-like OSes only, you can have a /home partition that every OS will share and you don't need this tutorial. However, if you want to use a Windows OS as well, here is what you need to do.

View compress_images.js
const { spawn } = require("child_process");
const { promises: fs } = require("fs");
const path = require("path");
const GUETZLI_EXEC = "C:\\ProgramData\\chocolatey\\bin\\guetzli.EXE";
const MAGICK_EXEC = "C:\\ProgramData\\chocolatey\\bin\\magick.EXE";
// const sizes = [190, 290, 415, 830, 1125];
// const sizes = [612];
const sizes = [317, 830];
View SassMeister-input.scss
// ----
// libsass (v3.5.4)
// ----
// custom responsive
// custom variables
// colors
// main colors
$custom-color-primary: #3dcd58;

Keybase proof

I hereby claim:

  • I am aduh95 on github.
  • I am aduh95 ( on keybase.
  • I have a public key ASDQ0EuwikxsBDgg7y1dFeZptMBPWQlFs7VayGo6uFWSCQo

To claim this, I am signing this object:

View generate_toc.js
* Based on the [Stuart Langridge script](
* Generated TOC
* aduh95, 2017-09-28
* Generate a table of contents, based on headings in the page.
* To place the TOC on your Markdown or HTML document, insert this
* script and add the following `nav` element to your document where
* you want the TOC to be generated.