Skip to content

Instantly share code, notes, and snippets.

View MaxymVlasov's full-sized avatar
🚴‍♂️
🇺🇦

Maksym Vlasov MaxymVlasov

🚴‍♂️
🇺🇦
View GitHub Profile
@originalhat
originalhat / gist:5258119
Last active December 29, 2016 23:05
using rebase to remove a commit

Using Rebase to Remove Bad Commits

Rebase at your own risk!

Fixing up and squashing commits with rebase is great fun and handy to keep the logs clean from lots of little commits like typos, but only before a push (unless you're sure nobody else has pulled since then).

When you rebase, it re-writes all SHA values after the removed commit(s). This can be troublesome when you may have already pushed to a remote. This has serious implications for breaking the repository for collaborators.

Create & Enter the Branch

@jboner
jboner / latency.txt
Last active August 15, 2025 16:42
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