Skip to content

Instantly share code, notes, and snippets.

View Advantechnica's full-sized avatar
🎯
Focusing

Aaron Advantechnica

🎯
Focusing
View GitHub Profile
@Advantechnica
Advantechnica / gist:c873f320f8f73dfc767d8b019796b027
Created June 3, 2023 21:59
AWS sts assume role in one command
export $(printf "AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s AWS_SESSION_TOKEN=%s" \
$(aws sts assume-role \
--role-arn arn:aws:iam::123456789012:role/MyAssumedRole \
--role-session-name MySessionName \
--query "Credentials.[AccessKeyId,SecretAccessKey,SessionToken]" \
--output text))
@Advantechnica
Advantechnica / latency.txt
Created April 2, 2023 21:58 — 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
### Keybase proof
I hereby claim:
* I am advantechnica on github.
* I am agmorgan (https://keybase.io/agmorgan) on keybase.
* I have a public key ASB5PEeMrIr6A9fLMH2KPXBqM6vaPJMkMKsQUQ5a6GRQewo
To claim this, I am signing this object: