Skip to content

Instantly share code, notes, and snippets.

@negrinho
negrinho / latency.txt
Created July 16, 2018 21:11 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers Simplified (~2012)
---------------------------------- log2 log10
L1 cache reference 0 0 ~ 1 ns
Branch mispredict 3 1
L2 cache reference 4 1
Mutex lock/unlock 6 2
Main memory reference 8 2
Compress 1K bytes with Zippy 13 4
Send 1K bytes over 1 Gbps network 14 4
Read 4K randomly from SSD* 18 5
@artkpv
artkpv / pomodoro.ps1
Created September 18, 2017 08:45
Simple Powershell pomodoro timer with notification and logging
function pomo {
# simple pomodoro timer:
# pomo [minutes]
param($minutes = 25)
$start = (get-date)
while ($true) {
$left = (get-date) - $start
if (($left.Minutes) -ge $minutes) { break }
[System.Console]::Out.Write("`r$($minutes - $left.Minutes)m left...")
sleep 3
@artkpv
artkpv / rocketpdftocsv.py
Last active September 16, 2019 09:40
Convert PDF to CSV for Rocketbank (Рокетбанк)
#!/bin/python3
"""
Конвертирует транзакции Рокетбанка (https://rocketbank.ru) из PDF в CSV.
Выводит в UTF8.
Зависимости:
- Poppler. В PATH: 'pdftotext'
https://poppler.freedesktop.org/
https://jlk.fjfi.cvut.cz/arch/manpages/man/pdftotext.1