Skip to content

Instantly share code, notes, and snippets.

View Dylancyclone's full-sized avatar

Dylan Lathrum Dylancyclone

View GitHub Profile
@AlexFBP
AlexFBP / CleanBranches.md
Created January 22, 2023 19:04
Clean local branches that have been deleted in remote

TLDR

Add this alias (enter this once on your terminal)

git config --global alias.cb '!git fetch -p && for branch in $(git for-each-ref --format '\''%(refname) %(upstream:track)'\'' refs/heads | awk '\''$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'\''); do git branch -D $branch; done'

so whenever you need to clean your local branches without removing just need to

@mattbell87
mattbell87 / remote-wsl.md
Last active May 23, 2024 13:36
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
@jtanx
jtanx / keybindings.json
Created April 23, 2017 09:33
Visual Studio Code disable MRU tab switching
[
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
}
]