Skip to content

Instantly share code, notes, and snippets.

View hayorov's full-sized avatar
🌴
Life is a one long vacation 😎

Alex Khaerov hayorov

🌴
Life is a one long vacation 😎
View GitHub Profile
@hayorov
hayorov / latency.txt
Created December 20, 2019 02:48 — forked from jboner/latency.txt
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
@hayorov
hayorov / gist:b922cefe5db0c23a5f15fb0050f89300
Created January 4, 2019 03:31 — forked from danrigsby/gist:8346b842d1446628de5223b600668dca
Copy kubernetes secrets between namespaces
kubectl get secrets -o json --namespace old | jq '.items[].metadata.namespace = "new"' | kubectl create -f -
@hayorov
hayorov / release12.md
Created July 25, 2018 12:11 — forked from spukst3r/release12.md
release12

Release 12

  1. [Customer-facing] Sandbox Provider Account Configuration (use ACME Reseller info)

  2. [Tech] Research Public API caching behavior

  3. [Tech] Quick Start connector-backend log format refactoring

  4. [Tech] Finalize FMP module cleanup

@hayorov
hayorov / external_tastypie_serialization.py
Created February 24, 2016 21:40 — forked from AndrewJHart/external_tastypie_serialization.py
Different ways to use Tastypie's resource serialization and build a response outside of the API or a resource.. e.g. a separate view in views.py, building a custom view within the resource, etc..
"""
Credit to the parker library (https://github.com/coxmediagroup/parker/) and their TastyPieHandler.
"""
# Examples of building manual responses anywhere, w/i extra views, and overridden methods
############################################################################
# example of building a serialized response from anywhere
req = HttpRequest()