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
@quad
quad / 0-modular-errors-with-rusts-thiserror.md
Last active October 1, 2025 04:56
Modular Errors with Rust's thiserror

I've been writing Rust full-time with a small team for over a year now. Throughout, I've lamented the lack of clear best practices around defining error types. One day, I'd love to write up my journey and enumerate the various strategies I've both seen and tried. Today is not that day.

Today, I want to reply to a blog post that almost perfectly summarised my current practice.

Go read it; I'll wait!


@bkahlert
bkahlert / error-handling-out.md
Last active May 22, 2025 07:35
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 September 26, 2025 06:29
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
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active October 12, 2025 19:54 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@jboner
jboner / latency.txt
Last active October 19, 2025 15:29
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