Skip to content

Instantly share code, notes, and snippets.

View tombh's full-sized avatar

Thomas Buckley-Houston tombh

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

@Wumpf
Wumpf / cfd.md
Last active August 11, 2024 10:51
Notes on CFD
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@remarkablemark
remarkablemark / Dockerfile
Last active September 2, 2024 23:57
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 \
@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 {
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active August 2, 2024 15:13
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
@eevee
eevee / fonts.conf.xml
Last active September 5, 2022 03:42
my fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.fonts</dir>
<alias>
<family>serif</family>
<prefer>
<family>Source Serif Pro</family>
<family>IPAMincho</family>
</prefer>
@paulirish
paulirish / bling.js
Last active August 27, 2024 04:55
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
@lmars
lmars / commands.txt
Last active January 22, 2016 20:43
Flynn Redis
# create a redis app
flynn create --remote "" redis
# create a release using the latest (at the time of writing) Docker Redis image
flynn -a redis release add -f config.json "https://registry.hub.docker.com?name=redis&id=868be653dea3ff6082b043c0f34b95bb180cc82ab14a18d9d6b8e27b7929762c"
# scale the server to one process. This may time out initially as the server pulls the image, but watch "flynn -a redis ps" and should come up.
flynn -a redis scale server=1
# redis should now be running in the cluster at redis.discoverd:6379
@james-huston
james-huston / hastats.sh
Last active February 7, 2018 13:21
HAProxy stats to StackDriver using a shell script
# run this every minute from cron as a quick and dirty solution to get some
# haproxy stats on each of your listeners over to stackdriver
instance=$(curl -s "http://169.254.169.254/latest/meta-data/instance-id")
# while [ 1 ]; do
cp /dev/null /tmp/hastats.json
echo 'show stat' | socat - UNIX-CLIENT:/tmp/haproxy.sock \
|while IFS=',' read pxname svname qcur qmax scur smax slim stot bin bout dreq \
dresp ereq econ eresp wretr wredis status weight act bck chkfail chdown lastchg \