Skip to content

Instantly share code, notes, and snippets.

View trueNAHO's full-sized avatar

NAHO trueNAHO

View GitHub Profile
@jake-stewart
jake-stewart / color256.md
Last active February 24, 2026 11:47
Terminals should generate the 256-color palette

Terminals should generate the 256-color palette from the user's base16 theme.

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

@lorenzleutgeb
lorenzleutgeb / committer-progress.sh
Last active November 19, 2025 00:38
Nixpkgs Committer Progress
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash gh
set -eu
# MIT No Attribution (SPDX Identifier: MIT-0)
#
# Copyright 2023-2025 Lorenz Leutgeb, Peder Bergebakken Sundt
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active February 24, 2026 03:48
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active February 15, 2026 18:41
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@CMCDragonkai
CMCDragonkai / nixos_arduino_connection.md
Last active November 6, 2025 16:18
NixOS: Arduino Connection

Arduino Connection on NixOS

First we need lsusb command from the usbutils package.

> nix-env -i usbutils
> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 0403:6001 FTDI FT232 USB-Serial (UART) IC
@Jc2k
Jc2k / .bash_profile
Last active December 11, 2025 13:40
GPG Cheat Sheet
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
fi
@jboner
jboner / latency.txt
Last active February 24, 2026 06:41
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD