Skip to content

Instantly share code, notes, and snippets.

View kimuracl's full-sized avatar

Kimura_cl kimuracl

  • Chile
  • 04:26 (UTC -04:00)
View GitHub Profile
@jboner
jboner / latency.txt
Last active April 29, 2025 15:40
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
@mihow
mihow / load_dotenv.sh
Last active April 25, 2025 17:10
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@GreepTheSheep
GreepTheSheep / Install VBox Guest On Debian.md
Last active March 18, 2025 08:10
Install VBox Guest On Debian
  1. Install VirtualBox Extention Pack
  2. Prepare Linux kernel for VirtualBox: sudo apt install gcc make perl dkms
  3. Mount the Guest Additions disk
  4. Install Guest Additions: sudo sh /media/cdrom0/VBoxLinuxAdditions.run
  5. Reboot
  6. Enjoy
@bluPhy
bluPhy / list-all-projects-in-org.sh
Last active August 27, 2024 16:48
List all Google Cloud GCP projects in Organization
#!/usr/bin/env bash
# Google Cloud script
# This script checks in an organization for all the projects and list them
#
# Usage examples:
# list-all-projects-in-org.sh --organization 123456789
#
# Notes:
# To run this script, you need the required IAM permissions