Skip to content

Instantly share code, notes, and snippets.

View code-inflation's full-sized avatar

Robin Bürgi code-inflation

View GitHub Profile
@code-inflation
code-inflation / tmux-sessionizer.fish
Created June 29, 2025 21:00
Fuzzy find and switch to tmux sessions for git repositories
# Fuzzy find and switch to tmux sessions for git repositories
# Usage: tmux-sessionizer [directory]
# If no directory provided, opens fzf to select from ~/git subdirectories
function tmux-sessionizer
if test (count $argv) -eq 1
set selected $argv[1]
else
set selected (find ~/git -mindepth 1 -maxdepth 1 -type d | fzf)
end
@code-inflation
code-inflation / .gitconfig
Created October 24, 2022 11:24
nbconvert jupyter output filter for git: add to ~/.gitconfig
[filter "strip-notebook-output"]
clean = "jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR"
smudge = cat
required = true
# to activate for a repo create a .gitatributes file with the following content in the root of your repo:
# *.ipynb filter=stirp-notebook-output
@code-inflation
code-inflation / gnome_tiling.sh
Last active November 25, 2025 12:53
Switch Workspaces with Super + Number, move application with Super + Shift + Number
gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 8
gsettings set org.gnome.shell.keybindings switch-to-application-1 []
gsettings set org.gnome.shell.keybindings switch-to-application-2 []
gsettings set org.gnome.shell.keybindings switch-to-application-3 []
gsettings set org.gnome.shell.keybindings switch-to-application-4 []
gsettings set org.gnome.shell.keybindings switch-to-application-5 []
gsettings set org.gnome.shell.keybindings switch-to-application-6 []
gsettings set org.gnome.shell.keybindings switch-to-application-7 []
gsettings set org.gnome.shell.keybindings switch-to-application-8 []
@code-inflation
code-inflation / fedora_setup.sh
Last active June 5, 2022 13:01 — forked from danielkrash/fedora_setup.sh
Things to do after installing Fedora
#!/usr/bin/env bash
# ---------------------------------------------
# This has been updated to work with Fedora 36
# ---------------------------------------------
# Run a System Update
sudo dnf update
# Enable RPM Fusion
#######################################
# Get total data written... #
#######################################
# Get SMART attributes
SMART_INFO=$(sudo /usr/sbin/smartctl -A "$SSD_DEVICE")
# Extract required attributes
ON_TIME=$(echo "$SMART_INFO" | grep "$ON_TIME_TAG" | awk '{print $10}')
WEAR_COUNT=$(echo "$SMART_INFO" | grep "$WEAR_COUNT_TAG" | awk '{print $4}' | sed 's/^0*//')
@code-inflation
code-inflation / fix_aoe2_de_multiplayer_desync.sh
Last active December 29, 2022 17:40
Age of Empires 2: Definitive Edition on Linux desync fix
#!/bin/bash
if ! command -v cabextract &> /dev/null
then
echo "cabextract needs to be installed"
exit
fi
cd /home/$USER/.steam/steam/steamapps/compatdata/813780/pfx/drive_c/windows/system32/
mv ucrtbase.dll ucrtbase.dll.old
wget "wget https://download.microsoft.com/download/0/6/4/064F84EA-D1DB-4EAA-9A5C-CC2F0FF6A638/vc_redist.x64.exe"
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload .tmux.conf
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
docker ps -q | xargs docker stats