Skip to content

Instantly share code, notes, and snippets.

View tgamblin's full-sized avatar

Todd Gamblin tgamblin

View GitHub Profile
@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

@jboner
jboner / latency.txt
Last active June 9, 2024 15:21
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 May 21, 2024 20:05
How is git commit sha1 formed

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 <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@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 April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong