Skip to content

Instantly share code, notes, and snippets.

View pantuza's full-sized avatar
:octocat:
Solving networking problems with code

Gustavo Pantuza pantuza

:octocat:
Solving networking problems with code
View GitHub Profile
@pantuza
pantuza / dedup_path.fish
Created March 6, 2024 21:42
Deduplicate $PATH variable using Fish Shell
function dedup_path --description 'Remove duplicate entries from $PATH and preserves order'
set --local new_path
for path in $PATH
if not contains $path $new_path
set new_path $new_path $path
end
end
@pantuza
pantuza / git-default-main.fish
Last active March 16, 2021 19:16
Fish shell function/script to migrate current repository default branch from master to main
#
# This script / function migrates the current git project default branch from
# master to main. You need to run it from the root directory of the project.
#
# It uses Github CLI to update Github default branch and to update base branch
# from all open Pull Requests: https://github.com/cli/cli
#
# Author: Gustavo Pantuza
# https://blog.pantuza.com
#

Keybase proof

I hereby claim:

  • I am pantuza on github.
  • I am pantuza (https://keybase.io/pantuza) on keybase.
  • I have a public key whose fingerprint is 2A67 2F51 C9D9 2BE3 044F D59B 602A C5E1 105C 0079

To claim this, I am signing this object: