Skip to content

Instantly share code, notes, and snippets.

View tombh's full-sized avatar

Thomas Buckley-Houston tombh

View GitHub Profile
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active April 23, 2025 13:36
When should you use DateTime and when should you use Time?

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
@gilbert
gilbert / ajax-loader.scss
Created July 8, 2015 16:15
Global Mithril.js AJAX Loader
// Taken from http://loading.io/
uiload {
display: inline-block;
position: relative;
& > div {
position: relative;
}
}
@-webkit-keyframes ajax-loader {
@remarkablemark
remarkablemark / Dockerfile
Last active April 29, 2025 20:07
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@Wumpf
Wumpf / cfd.md
Last active April 4, 2025 09:17
Notes on CFD
@ChristopherBiscardi
ChristopherBiscardi / bevys-4th-birthday.org
Created September 8, 2024 22:36
Bevy's 4th Birthday

Bevy’s 4th birthday.

Its Bevy’s 4th birthday and while I’ve been around for a couple of previous birthday posts I’ve never written something myself.

This year I chose to step up into some additional maintainer duties on ecosystem crates like bevy_ecs_tilemap, which I consider foundational and important to update to new versions, and I started This Week in Bevy, which I’ll talk about a bit more later.

Why Bevy?

The overriding reason I started writing Rust in the first place is that it expanded the kinds of programs I could write. Game development falls into that category, so I started working with Bevy a number of years ago, before there were regular releases, but really ramped up when 0.8 introduced the Material APIs which really inspired me to dig deeper into rendering, and feel like this year was an

@fathonix
fathonix / README.md
Created November 10, 2024 01:47
Use Android Phone as Microphone w/ Echo Cancellation on Linux with PipeWire + ROC

Use Android Phone as Microphone w/ Echo Cancellation on Linux with PipeWire + ROC

Follow this tutorial first on setting up ROC: https://gavv.net/articles/roc-0.4/

Instead of following the config file provided on the tutorial, use this config to route ROC source to a Loopback device and an Echo Cancel device.

Restart PipeWire afterwards:

systemctl restart --user pipewire.service