Skip to content

Instantly share code, notes, and snippets.

@NijeboerFrank
NijeboerFrank / todo.sh.fish
Last active March 7, 2025 02:15
Fish completions for todo.txt-cli
#!/bin/fish
# Place this file into ~/.config/fish/completions or another completions directory
# https://fishshell.com/docs/current/completions.html#where-to-put-completions
# List the help page
set __todo_txt_help_output (todo.sh help)
# Commands
set -l todo_commands (string match -r '^\s{4}([[:lower:]]+).*$' -g $__todo_txt_help_output)
set -l commands_descriptions (string match -r '^\s{4}(\w+[[:ascii:]]+).*$' -g $__todo_txt_help_output)
@kborling
kborling / configuration.nix
Created December 24, 2021 23:59
NixOS Configuration (Sway/Wayland Enabled)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
@diegorodrigo90
diegorodrigo90 / garmin-express-wine.md
Last active April 5, 2025 13:14
Installing garmin express in linux with wine

First we start by creating a wineprefix and installing our prerequisites from terminal:

WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks dotnet452 vcrun2010 corefonts
WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks win7
@DrSensor
DrSensor / desktop.nix
Last active June 11, 2024 01:48
My plan for full migration into NixOS and Wayland
{ pkgs ? import <nixpkgs>
, lib ? pkgs.lib
, desktopEnvironment
}: with pkgs;
desktopEnvironment {
session-manager = emptty;
window-manager = [ sway labwc ];
screen-display = {
use = kanshi; # autorandr
gui = wlay;
@ekickx
ekickx / rc.xml
Last active June 11, 2024 01:48
labwc sample conf
<?xml version="1.0" encoding="UTF-8"?>
<openbox_config>
<keyboard>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>bash ~/Projects/bin/volume mute</command>
</action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
@mschwaig
mschwaig / sway.nix
Last active July 13, 2024 01:10
Configure sway as the window manager for NixOS with gdm as the display manager
{ config, pkgs, lib, ... }:
{
# This sway config is mostly based on https://nixos.wiki/wiki/Sway
# which integrates sway with systemd in the style described here
# https://github.com/swaywm/sway/wiki/Systemd-integration
# and the replies in https://github.com/NixOS/nixpkgs/issues/57602
# with some individual packages added/removed and using sddm as the display manager.
#
# Take care to start the correct target as described by the sway proejct wiki.
@petelacey
petelacey / Dockerfile
Last active April 7, 2025 01:02
Docker Compose setup for Elixir, Phoenix, and Postgres
FROM elixir:latest
# Install debian packages
RUN apt-get update && \
apt-get install --yes build-essential inotify-tools postgresql-client git && \
apt-get clean
ADD . /app
# Install Phoenix packages
@thealmarty
thealmarty / iterate.ml
Last active January 23, 2025 02:32
Iterate function using unfold in OCaml
(* The unfold function takes in
a predicate (p) and
a function (g) which takes an input (b). *)
let rec unfold p g b =
if p b then [] else
(match g b with (a, bprime) ->
a :: unfold p g bprime)
;;
(* The iterate function takes in a function (f),
@jtpaasch
jtpaasch / Ocaml-Systems-Programming.md
Created July 5, 2018 14:28
Notes/tutorial on systems programming in OCaml.

OCaml Systems Programming

Including the unix module

To compile

Compile your modules first, e.g.:

(*
RecursiveTypesAndFold-2.fsx
Related blog post: http://fsharpforfunandprofit.com/posts/recursive-types-and-folds-2/
*)
// ==============================================
// PART 2 - Introducing Folds
// ==============================================