Skip to content

Instantly share code, notes, and snippets.

View ids1024's full-sized avatar

Ian Douglas Scott ids1024

View GitHub Profile
@ticki
ticki / gist:67633bbc8118f13dac7c5e4da725464e
Last active January 12, 2023 17:04
Redox OS April Fools EULA
This End-User License Agreement (EULA) is a legal agreement between you
(either an individual or a single entity) and the mentioned author
(REDOX OS(TM)(R)(C) DEVELOPERS) of this Software for the software product
identified above, which includes computer software and may include associated
media, printed materials, and "online" or electronic documentation
("SOFTWARE PRODUCT").
By installing, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be
bounded by the terms of this EULA.
If you do not agree to the terms of this EULA, do not install or use the
module Printf
%default total
data Format = FInt Format -- %d
| FString Format -- %s
| FOther Char Format -- [a-zA-Z0-9]
| FEnd --
format : List Char -> Format
@Synthetica9
Synthetica9 / pyg.py
Last active May 16, 2016 15:34
An interpeter for pyg, the golfed python. Fully backwards compatible with python.
#A golfed python 'accent'. Fully backwards compatible with python.
#NOT SUITED FOR DAY-TO-DAY PROGRAMMING!
#If you DO use it for a production (non-challenge/codegolf) program, I'm not
#responsible for anything bad that happens to you, your computer,
#your spare time, your code maintainability, any kittens that god might kill,
#or the tears of blood you will weep.
import sys
from math import *
@huonw
huonw / blackmagic.rs
Created January 15, 2014 12:42
do-while loops in Rust
while {
let x = foo();
bar(x);
x != 0
} {}
@alexblackie
alexblackie / post-receive.sh
Created January 31, 2013 09:39
Deploy a Middleman site by building it server-side on a Git post-receive (making deployment as easy as "git push").
#!/bin/sh
# Simply point your virtualhost to the GIT_WORK_TREE below, with "/build" appended. (ex: /path/to/webroot/example.com/build)
# This is how I manage all of my sites. I highly recommend this setup.
GIT_WORK_TREE=/path/to/webroot/example.com # Set this to your webroot path (sans build)
export GIT_WORK_TREE
git checkout -f
# Enter Directory
@jboner
jboner / latency.txt
Last active April 27, 2025 02:27
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