Skip to content

Instantly share code, notes, and snippets.

View bitcodr's full-sized avatar
👨‍💻
Focusing...

Amir Roshanaei bitcodr

👨‍💻
Focusing...
View GitHub Profile
@bitcodr
bitcodr / latency.txt
Last active April 2, 2023 07:18 — forked from jboner/latency.txt
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
@bitcodr
bitcodr / install-facetime-hd-webcam.sh
Created October 30, 2020 09:30 — forked from petrstepanov/install-facetime-hd-webcam.sh
Linux Install FaceTimeHD Camera
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
@bitcodr
bitcodr / WSL2_VPN_Workaround_Instructions.md
Created September 12, 2021 14:44 — forked from machuu/WSL2_VPN_Workaround_Instructions.md
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active. The workaround breaks down into two problems:

  1. Network connection to internet
  2. DNS in WSL2

This problem is tracked in multiple microsoft/WSL issues including, but not limited to: