Skip to content

Instantly share code, notes, and snippets.

View adia-dev's full-sized avatar
🖥️
Programming

Abdoulaye DIA adia-dev

🖥️
Programming
  • Criteo
  • ESGI - Paris
  • 06:13 (UTC +01:00)
View GitHub Profile
@Nimmidev
Nimmidev / copy_mode_with_line_numbers.sh
Last active December 8, 2025 21:29
tmux copy mode with line numbers
#!/bin/sh
declare -r LINE_NUMBER_PANE_WIDTH=3
declare -r LINE_NUMBER_UPDATE_DELAY=0.1
declare -r COLOR_NUMBERS_RGB="101;112;161"
declare -r COLOR_ACTIVE_NUMBER_RGB="255;158;100"
open_line_number_split(){
local self_path=$(realpath $0)
local pane_id=$(tmux display-message -pF "#{pane_id}")
@karlseguin
karlseguin / test_runner.zig
Last active December 6, 2025 21:47
Custom Zig Test Runner, better ouput, timing display, and support for special "tests:beforeAll" and "tests:afterAll" tests
// This is for the Zig 0.15.
// See https://gist.github.com/karlseguin/c6bea5b35e4e8d26af6f81c22cb5d76b/1f317ebc9cd09bc50fd5591d09c34255e15d1d85
// for a version that workson Zig 0.14.1.
// in your build.zig, you can specify a custom test runner:
// const tests = b.addTest(.{
// .root_module = $MODULE_BEING_TESTED,
// .test_runner = .{ .path = b.path("test_runner.zig"), .mode = .simple },
// });
@tranquan
tranquan / xcode-keybindings-as-vscode.md
Last active November 7, 2025 07:45
Xcode KeyBindings as VSCode
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs