Skip to content

Instantly share code, notes, and snippets.


Stephan Sokolow ssokolow

View GitHub Profile
staltz /
Last active Aug 8, 2022
The introduction to Reactive Programming you've been missing
jboner / latency.txt
Last active Aug 7, 2022
Latency Numbers Every Programmer Should Know
View latency.txt
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
flibitijibibo /
Created Jun 17, 2016
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

I would recommend looking at that first! After that, read on...

rsvp /
Last active Aug 6, 2022
noise : relaxing ambient Brown noise generator (cf. white noise) | Linux bash script using sox | CogSci notes
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2019-01-02
# _______________| noise : ambient Brown noise generator (cf. white noise).
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
# Dependencies: play (from sox package)
HaleTom /
Last active Aug 5, 2022
Print a 256-colour test pattern in the terminal
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See
set -eu # Fail on errors or undeclared variables
timvisee /
Last active Aug 5, 2022
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.


  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
ageis /
Last active Aug 5, 2022
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

bskinn / intersphinx_mappings.txt
Last active Aug 4, 2022
Various intersphinx mappings
View intersphinx_mappings.txt
# The entries in this file are checked regularly for validity via the Github Action
# sited at
# Please feel free to post an issue at that repo if any of these mappings don't work for you,
# or if you're having trouble constructing a mapping for a project not listed here.
Python 3 [latest]: ('', None)
Python 3 [3.x]: ('', None)
attrs [stable]: ('', None)
Django [dev]: ('', '')
Flask [2.2.x]: ('', None)
dupuy / README.rst
Last active Aug 3, 2022
Common markup for Markdown and reStructuredText
View README.rst

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.