Skip to content

Instantly share code, notes, and snippets.

View priyavrat-misra's full-sized avatar
😴
miles to go before I sleep

Priyavrat Misra priyavrat-misra

😴
miles to go before I sleep
View GitHub Profile
@jboner
jboner / latency.txt
Last active March 14, 2025 07:37
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
@Starefossen
Starefossen / vim-cheats.md
Last active February 20, 2025 16:28
My vim cheat sheet for working with tabs and window splits.

Tabs

New Tab

  • :tabnew - new blank tab
  • :tabedit [file] - open file in tab

Cursor Movement

  • gt (:tabn) - next tab
@staltz
staltz / introrx.md
Last active March 13, 2025 12:33
The introduction to Reactive Programming you've been missing
@fnky
fnky / ANSI.md
Last active March 14, 2025 01:54
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@faustinoaq
faustinoaq / myAngular.html
Last active March 10, 2025 07:08
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;