Skip to content

Instantly share code, notes, and snippets.

@boarnoah
Last active December 16, 2020 21:11
Show Gist options
  • Select an option

  • Save boarnoah/e8b7c79c0b09a5c11fd4cbb27a65736d to your computer and use it in GitHub Desktop.

Select an option

Save boarnoah/e8b7c79c0b09a5c11fd4cbb27a65736d to your computer and use it in GitHub Desktop.

Revisions

  1. boarnoah revised this gist Dec 16, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion boarnoah.PowerShell_profile.ps1
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,4 @@ function port {
    Get-Process -Id (Get-NetTCPConnection -LocalPort $args[0]).OwningProcess
    }

    New-Alias grep findstr
    New-Alias grep Select-String
  2. boarnoah created this gist Jul 25, 2020.
    12 changes: 12 additions & 0 deletions boarnoah.PowerShell_profile.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # 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 findstr