Skip to content

Instantly share code, notes, and snippets.

@KonnorRogers
KonnorRogers / Dockerfile
Created August 26, 2026 18:48
Dockerfile for Web Awesome + 11ty
ARG NODE_VERSION="22"
# base image to use for docker-compose
FROM node:${NODE_VERSION} AS builder
# This needs to happen _inside_ of the FROM to be in "context"
ARG PG_MAJOR_VERSION="16"
# Install system dependencies.
RUN apt update -y && \
@vielmetti
vielmetti / hello.sh
Created July 19, 2023 05:18
hello.sh
#!/bin/sh
# echo is from Doug McIlroy, 1972
# dd ("copy and convert", or "disk destroyer"), 1974
echo hello world | dd conv=ucase
# sed from 1974; sed -E is later
echo "Hello World" | sed -E 's/(.)/\1\n/g'
# awk is from 1977
awk 'BEGIN { print "Hello World" }'
echo "World Hello" | awk '{print $2, $1}'
# rs (reshape) is from 1983, 4.2 BSD
@miguelmota
miguelmota / external_link_arrow.txt
Last active October 18, 2026 08:08
Unicode UTF-8 external link arrow symbol (closest thing to it)
@chabala
chabala / using-google-takeout.md
Last active September 1, 2026 00:01
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -

bad practice

sudo npm i -g <module>

good practice

npm config set prefix 
@simonw
simonw / readme.md
Created March 26, 2020 16:16
Making a Datasette of Finnish coronavirus data

TypeScript intro

How to setup TypeScript and use in a normal JavaScript project for learning purposes.

Preparations

  • mkdir lab-ts
  • cd lab-ts
  • git init
  • touch .gitignore. Add node_modules and dist to the file.
@NeilJS
NeilJS / gist:32ac664f846bdea9aac25a428fe3727a
Created September 30, 2019 08:24
Chrome snippet: designMode="on" + kill all links
// Disable anchor links
window.addEventListener("click", function (event) {
event.preventDefault();
});
// Disable click eventlisteners
window.addEventListener("click", function (event) {
event.stopPropagation();
}, true);
// design mode on
document.designMode = "on";
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active July 13, 2026 18:43
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

const Torus3D = {
props: {
// 3D -> 2D projection settings
camera: {
type: 'orthographic',
zoom: 2.25,
position: [ 1, 1, 1 ]
},
// Vertex transformation before screen space transformation
transform: {