Skip to content

Instantly share code, notes, and snippets.

@jmarrec
jmarrec / .gitconfig
Last active March 28, 2025 16:33
Git alias for fixing up a commit
[alias]
fixup = "!f() { \
git diff --cached --quiet && echo \"Nothing is staged\" && exit 1; \
fixup_commit=$(git log --oneline | fzf --height=40% --layout=reverse --prompt='git log>' --with-nth='2..' --preview='git show --color=always {1}'); \
echo \"Amending commit: $fixup_commit\"; \
fixup_commit_sha=$(echo $fixup_commit | awk '{print $1}'); \
git commit --fixup=$fixup_commit_sha; \
git rebase --update-refs --autosquash -i $fixup_commit_sha^1;
@diegorodrigo90
diegorodrigo90 / garmin-express-wine.md
Last active April 26, 2025 17:13
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
@willyneutron
willyneutron / gist:0660f013af351cdf4540728e3848d8a9
Created September 7, 2020 18:05
Compile WSL2 kernel to compile modules
Getting the kernel code
-----------------------
Download the kernel you want from here:
https://github.com/microsoft/WSL2-Linux-Kernel/tags
```
cd /tmp
wget "https://github.com/microsoft/WSL2-Linux-Kernel/archive/4.19.104-microsoft-standard.tar.gz"
tar -xzvf 4.19.104-microsoft-standard.tar.gz
```
@MightyPork
MightyPork / usb_hid_keys.h
Last active April 24, 2025 23:20
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/