Skip to content

Instantly share code, notes, and snippets.

View CoelacanthusHex's full-sized avatar
☹️
Depression

Coelacanthus CoelacanthusHex

☹️
Depression
View GitHub Profile
@lilydjwg
lilydjwg / subreap.c
Created March 13, 2015 04:10
zsh/subreap module
#include<sys/prctl.h>
#include "subreap.mdh"
#include "subreap.pro"
/**/
static int
bin_subreap(char *nam, char **args, Options ops, UNUSED(int func))
{
int reaping = !OPT_ISSET(ops, 'u');
int result = prctl(PR_SET_CHILD_SUBREAPER, reaping);
@clemtibs
clemtibs / Commit Formatting.md
Last active February 13, 2025 03:36
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@hubgit
hubgit / README.md
Last active March 11, 2025 17:21
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@jboner
jboner / latency.txt
Last active April 19, 2025 21:29
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