Skip to content

Instantly share code, notes, and snippets.

@fede-green
Last active October 22, 2025 07:32
Show Gist options
  • Select an option

  • Save fede-green/55129bf21be19138f032e8a01f50e5f7 to your computer and use it in GitHub Desktop.

Select an option

Save fede-green/55129bf21be19138f032e8a01f50e5f7 to your computer and use it in GitHub Desktop.
fish config
#cs aliases
alias pro="cd /home/fprato/Projects"
#phpstorm
alias pstorm="phpstorm ./"
# ----------------------
# Git Aliases
# ----------------------
abbr -a ga git add
alias gb='git branch'
alias gbd='git branch -d '
alias gc='git commit'
alias gcm='git commit -m'
abbr -a gco git checkout
abbr -a gcob git checkout -b
alias gcom='git checkout master'
alias gd='git diff'
alias gda='git diff HEAD'
alias gl='git log'
alias glg='git log --graph --oneline --decorate --all'
alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
abbr -a gmnff git merge --no-ff
abbr -a gpl git pull
abbr -a gpu git push
alias gss='git status -s'
alias gsta='git stash'
alias gstl='git stash list'
alias gstp='git stash pop'
alias gstd='git stash drop'
alias gst='git status'
alias gmt='git mergetool'
alias gmv='git mv'
abbr -a gf git fetch
abbr -a grm git rm
abbr -a cdg cd-gitroot
abbr -a g git
#copy
abbr -a c xclip -selection clipboard
abbr -a v xclip -o
#AWS
set PATH ~/.local/bin $PATH
export AWS_PROFILE=trimble
#welcome
cowsay -f tux "Welcome to Ubuntu"
#be kind
alias please='sudo'
#time management
abbr -a tco timew start working
abbr -a tsu timew summary
abbr -a tst timew start
alias tsto='timew stop ;; timew summary :ids :week'
#!/bin/bash
# List current running connections and allow user to select one using fzf
connection_drop_name=$(nmcli c show --active | awk 'NR>1 {print $1}' | fzf --prompt="Select a connection to drop: ")
# Check if a connection was selected
if [ -z "$connection_drop_name" ]; then
echo "No connection selected. Exiting."
# exit 1
fi
# Bring down the selected connection
nmcli c down "$connection_drop_name"
# List current running connections and allow user to select one using fzf
connection_name=$(nmcli c show --active | awk 'NR>1 {print $1}' | fzf --prompt="Select a connection to RESET: ")
# Check if a connection was selected
if [ -z "$connection_name" ]; then
echo "No connection selected. Exiting."
exit 1
fi
# Modify the connection to reset DNS settings
nmcli c modify "$connection_name" ipv6.dns ""
nmcli c modify "$connection_name" ipv4.dns ""
nmcli c modify "$connection_name" ipv6.dns-search ""
nmcli c modify "$connection_name" ipv4.dns-search ""
nmcli c modify "$connection_name" ipv4.ignore-auto-dns "no"
nmcli c modify "$connection_name" ipv6.ignore-auto-dns "no"
nmcli c modify "$connection_name" ipv4.ignore-auto-routes "no"
nmcli c modify "$connection_name" ipv6.ignore-auto-routes "no"
nmcli c modify "$connection_name" ipv4.routes ""
nmcli c modify "$connection_name" ipv6.routes ""
# Restart the network manager to apply changes
sudo systemctl restart NetworkManager
sudo systemd-resolve --flush-caches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment