ここは「asa1984 Advent Calendar 2024」6日目の記事。Windowsの群れ、Linuxの群生地、悠然と空を舞うAndroid…パーツとソフトウェアが生い茂る大草原には、様々なコンピューターが暮らしています。
そんな中、他のコンピューターたちから遠く離れた場所にポツリと1枚の銀の板が。見つけましたM1 Macbook Airです!
今回は幻のOS・macOSの不思議な生態に迫ります。
;; Dual header line is possible by exploiting the tab-bar line that | |
;; sits on top of the header line and is generally hidden. For the | |
;; icon, it has to be precisely cut in top and bottom part and each | |
;; part is concatenated with either the tab-line or header-line. | |
(defun dual-header (top bottom) | |
"This installs a double line header in current buffer using both tab line (TOP) and header line (BOTTOM)." | |
(set-face-attribute 'tab-line (selected-frame) |
(use-package vertico-posframe | |
:config | |
(setq vertico-posframe-parameters | |
'((left-fringe . 8) | |
(right-fringe . 8))) | |
(setq vertico-posframe-border-width 3) | |
:init | |
(vertico-posframe-mode) |
# MONITORING: services run on loopback interface | |
# nginx reverse proxy exposes services to network | |
# - grafana:3010 | |
# - prometheus:3020 | |
# - loki:3030 | |
# - promtail:3031 | |
# prometheus: port 3020 (8020) | |
# | |
services.prometheus = { |
#!/usr/bin/lua5.4 | |
--[[ | |
NOTE: | |
- execp() needs 'lua-posix' package | |
- bitwise operands for tag mappings need Lua version >= 5.3 | |
--]] |
I wanted to write a module that generates multiple systemd services and timers to scrub some zfs pools at certain intervals. The default scrub config does not support individual scrub intervals for each pool.
I want the config to look like this:
{
services.zfs-auto-scrub = {
tank = "Sat *-*-* 00:00:00";
Based on Evan You's methodology: https://github.com/yyx990803/vue-svelte-size-analysis
Vue | Vue (SSR) | Svelte | Svelte (SSR) | Solid | Solid (SSR) | |
---|---|---|---|---|---|---|
Source | 3.93kb | - | 3.31kb | - | 4.98kb | - |
Compiled w/o imports (min) | 2.73kb | - | 5.01kb (183.52%) | 6.59kb (241.39%) | 3.68kb (134.805) | 3.96kb (145.05%) |
Compiled w/o imports (min+gz) | 1.25kb | - | 2.13kb (170.40%) | 2.68kb (214.40%) | 1.46kb (116.80%) | 1.57kb (125.60%) |
Compiled w/o imports (min+brotli) | 1.10kb | - | 1.88kb (170.91%) | 2.33kb (211.82%) | 1.26kb (114.55%) | 1.32kb (120.00%) |
# Full NixOS configuration for a ZFS server with full disk encryption hosted on Hetzner. | |
# See <https://mazzo.li/posts/hetzner-zfs.html> for more information. | |
{ config, pkgs, ... }: | |
let | |
# Deployment-specific parameters -- you need to fill these in where the ... are | |
hostName = "..."; | |
publicKey = "..."; | |
# From `ls -lh /dev/disk/by-id` |
#!/usr/bin/env bash | |
set -euo pipefail | |
## Defaults | |
keepGensDef=10; keepDaysDef=7 | |
keepGens=$keepGensDef; keepDays=$keepDaysDef | |
## Usage | |
usage () { | |
printf "Usage:\n\t trim-generations.sh (defaults are: Keep-Gens=$keepGensDef Keep-Days=$keepDaysDef Profile=user)\n\n" |
At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.
What killed Haskell, could kill Rust, too
What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.
Is Haskell dead?