Skip to content

Instantly share code, notes, and snippets.

@haampie
haampie / waterfall-gitlab.sh
Last active July 18, 2023 21:40
waterfall-gitlab.sh
#!/bin/sh
pipeline="$1"
[ -z "$pipeline" ] && echo "Usage: $0 <pipeline-id>" && exit 1
project=2
url="https://gitlab.spack.io/api/v4/projects/$project"
# Get the bridges, shouldn't be paginated

Package Management Devroom at FOSDEM ‘18

On Saturday 3rd February FOSDEM will host its first devroom dedicated to the subject of package management at ULB.

Topic

As this is the first time we’re hosting a package management devroom we want you to bring your own take. We’re open to exploring issues around distribution, verification, complexity, reproducibility, immutability, versioning, orphaning and sustaining package managers as an essential part of the open source ecosystem. Experiences, cautionary tales and ‘best-practice’ type talks are welcome. We are also considering a panel discussion.

Submissions

@tadast
tadast / countries_codes_and_coordinates.csv
Last active October 29, 2025 10:48
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Åland Islands AX ALA 248 60.116667 19.9
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
@jboner
jboner / latency.txt
Last active October 29, 2025 17:49
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
@masak
masak / explanation.md
Last active October 20, 2025 06:23
How is git commit sha1 formed

(The below text is licensed with CC0, which means that if you want to use or translate it, that is OK by me.)

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <[email protected]>

Date: Sun Apr 15 16:35:03 2012 +0200

@evansd
evansd / defer_signals.py
Last active March 31, 2020 15:39
Context manager to defer signal handling until context exits
# The MIT License (MIT)
#
# Copyright (c) 2013 David Evans
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
@datagrok
datagrok / gist:2199506
Last active December 16, 2024 16:14
Virtualenv's `bin/activate` is Doing It Wrong