Skip to content

Instantly share code, notes, and snippets.

View madmo's full-sized avatar

Moritz Bitsch madmo

View GitHub Profile
@madmo
madmo / init.el
Created June 29, 2021 08:51
emacs config
(require 'cl-lib)
(require 'package)
;; add melpa as package source
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
;; list of packages to install
(defvar my-packages
'(smart-tabs-mode smart-tab company flycheck lsp-mode lsp-ui rustic)
@madmo
madmo / onair-sign.py
Created August 31, 2021 05:37
Simple webcam on/off script used to control a onair sign with tasmota firmware
#!/usr/bin/python
import pyinotify
import asyncio
import aiohttp
import sys
def debounce(wait):
def decorator(fn):
def debounced(*args, **kwargs):
@madmo
madmo / kakrc
Last active January 26, 2023 21:04
My kakoune config (.config/kak/kakrc)
evaluate-commands %sh{
plugins="$kak_config/plugins"
mkdir -p "$plugins"
[ ! -e "$plugins/plug.kak" ] && \
git clone -q https://github.com/andreyorst/plug.kak.git "$plugins/plug.kak"
printf "%s\n" "source '$plugins/plug.kak/rc/plug.kak'"
}
plug "andreyorst/plug.kak" noload
plug "andreyorst/smarttab.kak"
plug "alexherbo2/auto-pairs.kak"
@madmo
madmo / immich.nix
Last active November 28, 2023 19:56
nixos config file to run immich containers (based on compose2nix output)
let
# The location where your uploaded files are stored
immich.upload_location="/srv/immich";
# Connection secrets for postgres and typesense. You should change these to random passwords
immich.typesense_api_key="";
immich.db_password="";
in
{ pkgs, lib, ... }: