Skip to content

Instantly share code, notes, and snippets.

View adamflott's full-sized avatar

Adam Flott adamflott

View GitHub Profile
@jehiah
jehiah / iphone_messages_dump.py
Last active September 28, 2020 03:53
Script to dump out messages to csv from an iPhone Backup sqlite file
# Copyright Jehiah Czebotar 2013
# http://jehiah.cz/
import tornado.options
import glob
import os
import sqlite3
import logging
import datetime
import csv

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
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 µ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 4X memory

@PurpleBooth
PurpleBooth / README-Template.md
Last active November 17, 2024 18:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@northox
northox / iked.conf
Last active September 10, 2021 17:42
OpenBSD's OpenIKEd roadwarrior VPN config for Ipad and such
ikev2 "inet" passive ipcomp esp \
from 0.0.0.0/0 to 10.0.1.0/24 \
from 10.0.0.0/24 to 10.0.1.0/24 \
local egress peer any \
srcid egress \
psk "strong-password" \
config protected-subnet 0.0.0.0/0 \
config address 10.0.1.0/24 \
config name-server 10.0.0.1 \
tag IKED