Skip to content

Instantly share code, notes, and snippets.

View bzm3r's full-sized avatar

Brian Merchant bzm3r

View GitHub Profile
@bzm3r
bzm3r / keybindings.json
Created September 14, 2024 22:38
keybindings.json
// Place your key bindings in this file to override the defaults
[
// ************************************************
// AGDA MODE
// Remove all default agda-mode keybindings.
// ************************************************
{
"command": "-agda-mode.load",
"key": "ctrl+c ctrl+l",
"mac": "ctrl+c ctrl+l",
@bzm3r
bzm3r / kanto_ora.json
Created September 2, 2024 20:03
EasyEffects preset for Kanto ORA
{
"output": {
"blocklist": [
"redeclipse",
"doomsday",
"assaultcube",
"kshisen",
"Shisen-Sho"
],
"filter#0": {

It seems the post is a roundabout way of saying: "a grammar that describes a superset of a <target language> is simpler than a grammar for the <target language>".

If so: the details left unspecified by that simplicity would make it a bad fit for reference documentation?

@bzm3r
bzm3r / sway-config-start
Last active December 15, 2023 20:27
sway-config-start
exec {
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
}
seat seat0 xcursor_theme phinger-cursors 24
@bzm3r
bzm3r / sway-config-end
Last active December 15, 2023 20:27
The last part of my sway configuration.
exec_all {
export XDG_DATA_DIRS=/nix/store/nkkdfnrkwrfgs3rpm1ln0pc96ff4n4gk-gsettings-desktop-schemas-45.0/share/gsettings-schemas/gsettings-desktop-schemas-45.0:$XDG_DATA_DIRS
gnome_schema=org.gnome.desktop.interface
gsettings set $gnome_schema color-scheme 'prefer-dark'
gsettings set $gnome_schema cursor-theme 'phinger-cursors'
gsettings set $gnome_schema document-font-name 'Atkinson Hyperlegible 16'
gsettings set $gnome_schema font-antialiasing 'rgba'
gsettings set $gnome_schema font-hinting 'full'
gsettings set $gnome_schema font-name 'Atkinson Hyperlegible 16'
gsettings set $gnome_schema gtk-theme 'Adwaita'
+++ dirname -- ./result/rust-shell
++ realpath -- ./result/recorded_env
+ ENV_SNAPSHOT=/nix/store/k7hw017q2q1jarcchhpjg2y10fkymv2f-rust-shell/recorded_env
+ source /nix/store/k7hw017q2q1jarcchhpjg2y10fkymv2f-rust-shell/recorded_env
++ declare -x AR=ar
++ declare -x AR_FOR_BUILD=ar
++ declare -x AS=as
++ declare -x AS_FOR_BUILD=as
++ declare -x CARGO_HOME=/home/bzm3r/.cargo_rust-shell
++ declare -x CC=clang
@bzm3r
bzm3r / rust-shell
Last active December 7, 2023 08:24
#!/usr/bin/env bash
set -x
ENV_SNAPSHOT=$(realpath -- "$(dirname -- "${BASH_SOURCE[0]}")/recorded_env")
source "$ENV_SNAPSHOT"
# make a .cargo directory (if it doesn't already exist)
echo "Creating CARGO_HOME at /home/bzm3r/.cargo_rust-shell"
declare -x AR="ar"
declare -x AR_FOR_BUILD="ar"
declare -x AS="as"
declare -x AS_FOR_BUILD="as"
declare -x CARGO_HOME="/home/bzm3r/.cargo_rust-shell"
declare -x CC="clang"
declare -x CC_FOR_BUILD="gcc"
declare -x CONFIG_SHELL="/nix/store/q1c2flcykgr4wwg5a6h450hxbk4ch589-bash-5.2-p15/bin/bash"
declare -x CXX="clang++"
declare -x CXX_FOR_BUILD="g++"
@bzm3r
bzm3r / unpacking-mkShell.nix
Created December 4, 2023 21:36
Unpacking how mkShell is defined.
{ lib, stdenv, buildEnv }:
{ name ? "rust-stable"
, # a list of packages to add to the shell environment
packages ? [ ]
, # propagate all the inputs from the given derivations: list of attrsets
inputsFrom ? [ ]
, buildInputs ? [ ]
, nativeBuildInputs ? [ ]
, propagatedBuildInputs ? [ ]
@bzm3r
bzm3r / no-hm.nix
Created November 30, 2023 22:49
How to not worry, and still be happy.
{
config,
lib,
pkgs,
_user,
...
}: let
inherit (builtins) replaceStrings;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.lists) flatten;