1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-08-01 13:37:49 +00:00

treewide: site redesign

This commit is contained in:
RGBCube 2025-06-01 21:32:33 +03:00
parent 3d663619e6
commit 4b146bbe4e
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
80 changed files with 1842 additions and 1117 deletions

View file

@ -1,6 +0,0 @@
{
"layout": "article.vto",
"type": "article",
"description": null
}

4
site/blog/_data.ts Normal file
View file

@ -0,0 +1,4 @@
export default {
layout: "article.vto",
type: "article",
};

View file

@ -4,7 +4,7 @@ description: Or how I missed the school bus because of a cosmic ray.
date: 2024-04-02
tags:
keywords:
- time
- unix-timestamps
---
@ -54,11 +54,11 @@ Maybe the 11th bit got flipped, making it increment 1024?
Aha! So the 11th bit got flipped by something. And that something was probably a
cosmic ray.
EDIT: It was not a cosmic ray. As pointed out by
[@BenjaminRi's comment on lobste.rs](https://lobste.rs/s/jb1o6q/cosmic_drift#c_1ztluj)
it was either a bug or storage corruption as the alarm ran late the next day.
You should still create more than one alarm just in case if you are using a
phone prone to this, however.
> **EDIT:** It was not a cosmic ray. As pointed out by
> [@BenjaminRi's comment on lobste.rs](https://lobste.rs/s/jb1o6q/cosmic_drift#c_1ztluj)
> it most likely was either a bug or storage corruption as the alarm ran late
> the next day. You should still create more than one alarm just in case if you
> are using a phone prone to this, however.
My main takeaway from this event is to create more than one alarm, for extra
redundancy. Who knew being prone to sleeping in could save you from your alarm

View file

@ -1,13 +1,13 @@
---
title: .gitignore is inherently Sisyphean
title: "`.gitignore` is inherently Sisyphean"
description: And how to roll the rock over the edge.
color: "#A5804C"
thumbnail: /assets/sisyphus-ds-store.webp
thumbnail: /assets/images/sisyphus-ds-store.webp
date: 2024-09-30
tags:
keywords:
- vcs
---
@ -17,7 +17,7 @@ You just started a new project. You ran `cargo init`, `poetry init` and
Those commands created the necessary files to work, it also added the following
lines to your .gitignore:
```text
```ignore
target
__pycache__
bin
@ -36,12 +36,12 @@ You start reviewing the code and notice a file quite out of place: `.DS_Store`.
You ask the person what it is, he says he has no clue.
![Hundreds of thousands of merge requests on GitHub trying
to gitignore .DS_Store](/assets/github-ds-store-mr-list.webp)
to gitignore .DS_Store](/assets/images/github-ds-store-mr-list.webp)
Whatever. You just delete the file from the branch and add the file's name to
the repositories gitignore:
```text
```ignore
target
__pycache__
bin
@ -56,7 +56,7 @@ request. You look at it, and see that there is a whole directory that is
irrelevant. You tell that person to delete the directory from the branch and add
it to the gitignore. The gitignore lives on:
```text
```ignore
target
__pycache__
bin
@ -67,7 +67,7 @@ bin
Then, someone that uses IntelliJ IDEA commits five hundred XML files and the
`.idea` directory. You repeat this process:
```text
```ignore
target
__pycache__
bin
@ -84,7 +84,7 @@ Hell. You feel like a mythic god undergoing punishment for cheating death and
deceiving the underworld.
![Sisyphus pushing up a boulder that has .DS_Store written
on it](/assets/sisyphus-ds-store.webp)
on it](/assets/images/sisyphus-ds-store.webp)
How do you escape this endless loop of ignoring files that sneak in? Maybe by
educating every single merge request author? Nope, that definitely won't work,
@ -95,7 +95,7 @@ Luckily, you realize that you can turn the blacklist of files (the gitignore) to
a whitelist, by just ignoring everything and manually un-ignoring desired files.
You change your gitignore to this:
```text
```ignore
*
!.gitignore

View file

@ -4,7 +4,7 @@ description: How the absolutely cursed HTMNIX project works.
date: 2024-03-04
tags:
keywords:
- html
- nix
---
@ -26,9 +26,6 @@ snippet that uses it:
<.html>
```
> (hightlight.js shits the bed while highlighting this abomination - just ignore
> it)
You are probably thinking furiously right now, maybe you've noticed something:
> Aha! In Nix, `<foo>` is used to find stuff from the Nix path like so:
@ -45,8 +42,8 @@ You are somewhat correct. But not quite.
Nix `<foo>` expressions actually boil down to a call of the builtin
`__findFile`, like so:
```shell
nix-instantiate --parse --expr "<foo>"
```nix
# nix-instantiate --parse --expr "<foo>"
(__findFile __nixPath "foo")
```

View file

@ -5,13 +5,13 @@ description: And revealing how cursed Nix is.
date: 2024-04-15
draft: true
tags:
keywords:
- nix
---
I was surfing the web a few weeks ago, and I came across this iceberg chart:
![The Nix Iceberg](/assets/nix-iceberg.webp)
![The Nix Iceberg](/assets/images/nix-iceberg.webp)
[Here's the original source for this image,
created by @leftpaddotpy, @puckipedia,
@ -262,7 +262,7 @@ allows flakes to be configured in "flake compile time". Let's say you have a
flake that provides a binary. Let's also assume you can run it with the
following Nix CLI invokation:
```shell
```sh
nix run github:me/hello-world
```
@ -292,7 +292,7 @@ is an ugly hack. You can do this in your flake:
And override the `debug-mode` input like so, to run a debug binary instead:
```shell
```sh
nix run github:me/hello-world --override debug-mode github:boolean-option/true
```
@ -502,7 +502,7 @@ This syntax is a way to check for the existence of a key in an attribute set.
<h2>
```shell
```sh
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
```
@ -515,7 +515,7 @@ You can use nix-shell as a script interpreter to allow scripts written in
arbitrary languages to obtain their own dependencies via Nix. This is done by
starting the script with the following lines:
```shell
```sh
#!/usr/bin/env nix-shell
#!nix-shell -i real-interpreter --packages packages
```

View file

@ -1,10 +1,10 @@
---
title: Swap the ı and i key on your keyboard for faster modal editing
title: Swap the `ı` and `i` key on your keyboard for faster modal editing
description: How to swap the ı and i key on your Turkish keyboard on Linux.
date: 2024-05-20
tags:
keywords:
- localisation
- modal-editors
---
@ -12,7 +12,7 @@ tags:
If you have ever used a Turkish-Q keyboard in combination with a modal editor
before, you might have noticed that the `i` key is pretty far off to the side:
![The placement of the `i` key on the Turkish-Q layout](/assets/turkish-q-i.webp)
![The placement of the `i` key on the Turkish-Q layout](/assets/images/turkish-q-i.webp)
This blog post will guide you on how to swap the `ı` key with the `i` key (but
not the `I` and `İ` keys). This will be a great change if you write primarily in
@ -119,7 +119,7 @@ This is how it is done on NixOS:
And this is how it is done on Arch:
```shell
```sh
cat << :end
include "/usr/share/kbd/keymaps/i386/qwerty/trq.map"