Skip to content

Instantly share code, notes, and snippets.

@gafda
gafda / .gitconfig
Last active April 11, 2025 11:38
GIT Config file in windows format
[user]
name = <first> <last name>
email = <my-email>@<corp>
signingKey = ssh-ed25519 mYaWsOmEsUpErKey <my-email>@<corp>
[alias]
aliases = config --get-regexp '^alias\\.'
bt = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
compact = !git gc --aggressive --prune=now
conflicts=diff --name-only --diff-filter=U
done = !git push origin HEAD
@gafda
gafda / update-scoop.ps1
Created March 12, 2024 13:42
Scoop Updater script for Powershell Core
# Scoop update & cleaner
scoop update
scoop update *
scoop cleanup *
scoop cache rm *
@gafda
gafda / Microsoft.PowerShell_profile.ps1
Created March 12, 2024 13:40
Windows 10+ / PowerShell Core initializer
# List of environment variables in Windows 10/11:
# %ALLUSERSPROFILE% – C:\ProgramData
# %APPDATA% – C:\Users\<username>\AppData\Roaming
# %CD% – Typing in this command will give you the current directory you are working in.
# %CMDCMDLINE% – Outputs command line used to launch the current Command Prompt session. (Command Prompt.)
# %CMDEXTVERSION% – This variable expands to the version of the command-line extensions.
# %COMMONPRGRAMW6432% – C:\Program Files\Common Files
# %COMMONPROGRAMFILES% – C:\Program Files\Common Files
# %COMMONPROGRAMFILES(x86)% – C:\Program Files (x86)\Common Files
# %COMPUTERNAME% -Outputs the system name.
@gafda
gafda / wsl-setup.sh
Last active March 12, 2025 10:58
WSL2 Startup process
#!/bin/bash
# List all WSL Online images: wsl -l -o
# Install WSL Ubuntu: wsl --install -d Ubuntu-24.04
# Stop WSL Ubuntu: wsl --shutdown Ubuntu-24.04
# Uninstall WSL Ubuntu: wsl --unregister Ubuntu-24.04
# List all WSL images: wsl -l -v
DISTRO=ubuntu2404
architecture=$(uname -m)