1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
| function st {git status .} function br {git branch @Args} function di {git difftool @Args} function ad {git add @Args} function ci {git commit @Args} function log {git log --name-only @Args} function log2 {git log --name-only --grep @Args} function log3 {git log --graph --pretty=oneline --abbrev-commit --name-only} function di2 {git difftool head~10 @Args} function co {git checkout @Args} function me {git merge --no-ff @Args} function pi {git cherry-pick @Args} function pull {git pull origin develop ; echo "pull develop"} function push {git push origin develop ; echo "push develop"} function pull2 {git pull origin master ; echo "pull master"} function push2 {git push origin master ; echo "push master"} function pull3 {git pull origin sit ; echo "pull sit"} function push3 {git push origin sit ; echo "push sit"} function pull4 {git pull origin uat ; echo "pull uat"} function push4 {git push origin uat ; echo "push uat"} function pull5 {git pull origin prod ; echo "pull prod"} function push5 {git push origin prod ; echo "push prod"}
function pu {git push origin @Args}
function kc {kubectl @Args}
function ed {C:\Users\user\Desktop\my\Tool\EditPlus\editplus.exe @Args}
function change-to-develop {co develop}
set-alias cod change-to-develop set-alias vi nvim
Invoke-Expression (& { $hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' } (zoxide init --hook $hook powershell | Out-String) })
Invoke-Expression (&starship init powershell)
Set-PSReadLineKeyHandler -Key Ctrl+b ` -BriefDescription BuildCurrentDirectory ` -LongDescription "Build current project" ` -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine() [Microsoft.PowerShell.PSConsoleReadLine]::Insert("gradle build -xtest") [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine() }
Set-PSReadLineKeyHandler -Key Ctrl+p ` -BriefDescription BuildCurrentDirectory ` -LongDescription "Build and publish current project" ` -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine() [Microsoft.PowerShell.PSConsoleReadLine]::Insert("gradle build publishtomavenlocal") [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine() }
Set-PSReadLineKeyHandler -Key Ctrl+d ` -ScriptBlock { [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine() [Microsoft.PowerShell.PSConsoleReadLine]::Insert("exit") [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine() }
function mem_used { $CompObject = Get-WmiObject -Class WIN32_OperatingSystem $Memory = ((($CompObject.TotalVisibleMemorySize - $CompObject.FreePhysicalMemory)*100)/ $CompObject.TotalVisibleMemorySize)
Write-Host "Memory usage in Percentage:" $Memory
$processMemoryUsage = Get-WmiObject WIN32_PROCESS | Sort-Object -Property ws -Descending | Select-Object -first 10 processname, @{Name="Mem Usage(MB)";Expression={[math]::round($_.ws / 1mb)}} $processMemoryUsage }
function battery { WMIC PATH Win32_Battery Get EstimatedChargeRemaining }
function fe { fzf | %{ ed $_ } }
set-alias lg lazygit set-alias gt gitui
|