Skip to content

Instantly share code, notes, and snippets.

View aknysh's full-sized avatar
:octocat:

Andriy Knysh aknysh

:octocat:
  • aknysh
View GitHub Profile

Keybase proof

I hereby claim:

  • I am aknysh on github.
  • I am aknysh (https://keybase.io/aknysh) on keybase.
  • I have a public key ASAr9J94yCRnnpqBq7dDrV3Sp3Aof-ZAGrPMRmChsuNC1Ao

To claim this, I am signing this object:

@aknysh
aknysh / web-servers.md
Created August 13, 2017 20:38 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@aknysh
aknysh / web-servers.md
Created August 13, 2017 20:38 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@aknysh
aknysh / latency.txt
Created July 30, 2017 15:49 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
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
@aknysh
aknysh / map.geojson
Created December 5, 2016 19:58 — forked from marr75/map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
with table_stats as (
select psut.relname,
psut.n_live_tup,
1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio
from pg_stat_user_tables psut
order by psut.n_live_tup desc
),
table_io as (
select psiut.relname,
sum(psiut.heap_blks_read) as table_page_read,