This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://ses4j.github.io/2020/04/01/git-alias-recent-branches/ | |
[alias] | |
lb = !git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(\" \\033[33m%s: \\033[37m %s\\033[0m\\n\", substr($2, 1, length($2)-1), $1)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.fabian-keller.de/blog/configuring-a-different-ssh-key-per-git-repository/ | |
git config core.sshCommand "ssh -F ~/.ssh/config-github-client-one" # config file | |
# or use identity file directly: git config core.sshCommand "ssh -i ~/.ssh/some_id_file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Process -Id (Get-NetTCPConnection -LocalPort YourPortNumberHere).OwningProcess | |
Get-Process -Id (Get-NetUDPEndpoint -LocalPort YourPortNumberHere).OwningProcess | |
# https://stackoverflow.com/a/48199/56151 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lazy load posh-git | |
Register-ArgumentCompleter -Native -CommandName 'git' -ScriptBlock { | |
if (!(gmo posh-git)) { Expand-GitCommand ($args[1] -replace '^git\W*', '') } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Use-LSColors { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[string]$LSColors | |
) | |
$LSColors -Split ":" | % { | |
$param, $arg = $_ -Split "=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fd --no-ignore System.Collections.Immutable.dll | gi |% { | |
[pscustomobject]@{name=$_; version=[Reflection.AssemblyName]::GetAssemblyName($_).Version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set environment variables from a file | |
cat ./vars.env | ConvertFrom-StringData |? Values -ne @{} |% {ni -Name $_.Keys -Value $_.Values -Path env: -Force} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws sts get-caller-identity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/github/gitignore | |
npx gitignore node |
NewerOlder