Skip to content

Instantly share code, notes, and snippets.

View candoumbe's full-sized avatar

Cyrille NDOUMBE candoumbe

View GitHub Profile
@candoumbe
candoumbe / clean-orphan-branches.sh
Created April 30, 2026 15:02
Delete local branches that don't have remote branches
git fetch --prune && current="$(git bran
ch --show-current)" && git for-each-ref --format='%(refname:short) %(upstream:track)' refs/heads | awk '$2=="[gone]
"{print $1}' | grep -vx "$current" | xargs -r git branch -D
@candoumbe
candoumbe / .wslconfig
Created January 4, 2023 15:23
WSL configuration file
[wsl2]
memory=4GB
swap=2GB
processors=2
@candoumbe
candoumbe / docker-remove-stale-containers.ps1
Created November 1, 2021 23:25
Remove docker containers with status exited and created
docker rm $(docker ps -a -f status=exited -f status=exited -q)
@candoumbe
candoumbe / Microsoft.Powershell_profile.ps1
Last active October 15, 2021 07:40
Powershell profile
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
Import-Module oh-my-posh
SET-PoshPrompt -Theme Paradox
Import-Module Posh-Git
# Import-Module -Name Terminal-Icons
}
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward