Skip to content

Instantly share code, notes, and snippets.

Avatar
🙀
🐛

Andrew Ekstedt magical

🙀
🐛
View GitHub Profile
@dracometallium
dracometallium / gmi2html.awk
Last active Aug 17, 2022
Another `text/gemini` to html translator, but this time it's AWK!
View gmi2html.awk
#!/usr/bin/gawk -f
BEGIN{
# Printing header!
print "<!DOCTYPE html>\n\
<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n\
<head>\n\
<meta charset=\"utf-8\" />\n\
<style type=\"text/css\">\n\
body{\n\
View gist:e4a0bcc8c458e4799ab66c95f9592cee
Utilities
---------
htop
tree
atool
the_silver_searcher (silversearcher-ag)
whois
mtr
mosh
vim
@eevee
eevee / gist:4942613
Last active Dec 13, 2015
Pokédex API
View gist:4942613

RIGHT SO there are several use cases here; essentially we want to make the entire website navigable via API.

which means you should be able to REQUEST:

  • lookup a single Pokémon
  • retrieve a single Pokémon unambiguously -- by identifier or id
  • search across all manner of properties

and RETRIEVE:

  • any property
  • in any language
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 — forked from jboner/latency.txt
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs