Skip to content

Instantly share code, notes, and snippets.

View mpldr's full-sized avatar
➡️
Find me on Sourcehut

Moritz Poldrack mpldr

➡️
Find me on Sourcehut
View GitHub Profile
@mosquito
mosquito / README.md
Last active March 28, 2025 02:03
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@nilp0inter
nilp0inter / fizzbuzz.rkt
Last active February 10, 2025 08:30
The first beautiful implementation of FizzBuzz?
#lang 2d racket
(require 2d/match)
(define (fizz? n)
(= 0 (modulo n 5)))
(define (buzz? n)
(= 0 (modulo n 3)))
@pmarreck
pmarreck / hendricks_formatter.ex
Created July 25, 2023 14:02
An Elixir formatting module for `mix format` that converts leading spaces to tabs.
defmodule HendricksFormatter do
@moduledoc """
This module is a formatter plugin for Elixir's `mix format` task
that converts leading whitespace to tabs.
It tries to intelligently determine the tab width based on the most common
counts of leading space runs in the file.
It allows additional space characters for minor adjustments that are below the tab width.
OK, why tabs? Why resurrect this age-old nerd debate again?
Very simple: It's an accessibility issue:
https://adamtuttle.codes/blog/2021/tabs-vs-spaces-its-an-accessibility-issue/