Skip to content

Instantly share code, notes, and snippets.

@boarnoah
Last active December 16, 2020 21:11
Show Gist options
  • Save boarnoah/e8b7c79c0b09a5c11fd4cbb27a65736d to your computer and use it in GitHub Desktop.
Save boarnoah/e8b7c79c0b09a5c11fd4cbb27a65736d to your computer and use it in GitHub Desktop.
My personal powershell profile, has a few Powershell cmdlets aliased to a roughly similar linux utility for muscle memory purposes.
# Should be put into powershell's $PROFILE which acts similar to a .bashrc
# ex: notepad $PROFILE
New-Alias which Get-Command
# Get process by port #, ex: "port 8080" -> Find culprit process *cough* random postgres server *cough*
function port {
Get-Process -Id (Get-NetTCPConnection -LocalPort $args[0]).OwningProcess
}
New-Alias grep Select-String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment