Skip to content

Instantly share code, notes, and snippets.

View oldgalileo's full-sized avatar
🏝️
surfing

Galileo Daras oldgalileo

🏝️
surfing
  • San Francisco, CA
View GitHub Profile
@bkahlert
bkahlert / error-handling-out.md
Last active August 10, 2023 17:52
Bash Error Handling — shell options -e/errexit, inherit_errexit, -E/errtrace and the ERR trap

Bash Error Handling — shell options -e/errexit, inherit_errexit, -E/errtrace and the ERR trap

This Markdown file is 90% the output of error_handling.bash.

I wrote the script / this document to describe the shell options errexit, inherit_errexit, and errtrace as well as the ERR trap and their conditions and interactions in more detail as this is what I always failed to understand with the pieces of information I found so far.

References

@troyharvey
troyharvey / deployment.yml
Last active February 27, 2024 04:47
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@jboner
jboner / latency.txt
Last active May 8, 2024 03:00
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