Skip to content

Instantly share code, notes, and snippets.

View elfsternberg's full-sized avatar
💭
Breathing

Ken "Elf" Mathieu Sternberg elfsternberg

💭
Breathing
View GitHub Profile
@iksi
iksi / fluid-typography.css
Created January 14, 2016 11:45
Fluid typography between a min & max font-size and molten leading
/**
* Fluid typography between a min & max font-size and molten leading
* calc(minSize + (maxSize - minSize) * ((100vw - minPort) / (maxPort - minPort)));
*/
:root {
font-size: 100%;
}
body {
font-size: 1em;
@andremueller
andremueller / bash_template.sh
Created April 2, 2022 16:10
A bash template with argument parsing and error handling
#!/bin/bash
# my bash template
set -o errexit
set -o nounset
shopt -s nullglob
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
function die() {
echo "ERROR $? IN ${BASH_SOURCE[0]} AT LINE ${BASH_LINENO[0]}" 1>&2
@quad
quad / 0-modular-errors-with-rusts-thiserror.md
Last active May 13, 2024 11:05
Modular Errors with Rust's thiserror

I've been writing Rust full-time with a small team for over a year now. Throughout, I've lamented the lack of clear best practices around defining error types. One day, I'd love to write up my journey and enumerate the various strategies I've both seen and tried. Today is not that day.

Today, I want to reply to a blog post that almost perfectly summarised my current practice.

Go read it; I'll wait!