Skip to content

Instantly share code, notes, and snippets.

@SVendittelli
Last active June 17, 2025 09:35
Show Gist options
  • Select an option

  • Save SVendittelli/272dae22c2c511ba63d9227830287e4f to your computer and use it in GitHub Desktop.

Select an option

Save SVendittelli/272dae22c2c511ba63d9227830287e4f to your computer and use it in GitHub Desktop.
description
[[Snippets]]
Description = "Get public IP address"
Output = "82.255.255.255"
Tag = ["network"]
command = "curl ifconfig.io"
[[Snippets]]
Description = "Test network conectivity by pinging google"
Output = "Reply from 8.8.8.8: bytes=32 time=18ms TTL=116"
Tag = ["network"]
command = "ping 8.8.8.8"
[[Snippets]]
Description = "Edit PowerShell history"
Output = ""
Tag = ["windows", "powershell"]
command = "nvim (Get-PSReadLineOption).HistorySavePath"
[[Snippets]]
Description = "Show all gitconfig values including which file set them"
Output = ""
Tag = ["git"]
command = "git config --list --show-origin"
[[Snippets]]
Description = "Print the path to the windows startup folder"
Output = "C:\\Users\\username\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
Tag = ["windows", "powershell"]
command = "[Environment]::GetFolderPath([Environment+SpecialFolder]::Startup)"
[[Snippets]]
Description = "Add nuget.org as a source to dotnet"
Output = ""
Tag = ["dotnet", "nuget"]
command = "dotnet nuget add source \"https://api.nuget.org/v3/index.json\" --name \"nuget.org\""
[[Snippets]]
Description = "Mark file as executable in git"
Output = ""
Tag = ["git"]
command = "git update-index --chmod=+x <file>"
[[Snippets]]
Description = "List all direct go dependencies"
Output = ""
Tag = ["go"]
command = "go list -u -m -f '{{if not .Indirect}}{{.}}{{end}}' all"
[[Snippets]]
Description = "List all outdated go direct dependencies"
Output = ""
Tag = ["go"]
command = "go list -u -m -f '{{if and (not .Indirect) .Update}}{{.}}{{end}}' all"
[[Snippets]]
Description = "List all outdated go dependencies"
Output = ""
Tag = ["go"]
command = "go list -u -m -f '{{if .Update}}{{.}}{{end}}' all"
[[Snippets]]
Description = "Start nvim without auto-session restoring"
Output = ""
Tag = ["nvim"]
command = "nvim --cmd \"let g:auto_session_enabled = v:false\""
[[Snippets]]
Description = "Store google credentials for terraform"
Output = ""
Tag = ["work", "terraform", "gcloud", "gcp", "google"]
command = "gcloud auth login && gcloud auth application-default login && export GOOGLE_CREDENTIALS=$(cat $HOME/.config/gcloud/application_default_credentials.json)"
@SVendittelli

Copy link
Copy Markdown
Author

Useful CLI Snippets

Managed using knqyf263/pet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment