Last active
August 21, 2017 10:43
-
-
Save PJB3005/aa04d4db91a9b56d4b1ea10d875a1e3d to your computer and use it in GitHub Desktop.
dotfiles
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
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) | |
Import-Module posh-git | |
# Set up a simple prompt, adding the git prompt parts inside git repos | |
function global:prompt { | |
$realLASTEXITCODE = $LASTEXITCODE | |
Write-Host($pwd.ProviderPath) -nonewline -ForeGroundColor green | |
Write-VcsStatus | |
$global:LASTEXITCODE = $realLASTEXITCODE | |
"`n> " | |
} | |
Pop-Location | |
Start-SshAgent -Quiet | |
function Resize-Gif($file, $out, $size) { | |
gifsicle $file, --resize $size -o $out | Write-Host | |
} | |
function Resize-Image($file, $size, $out) { | |
magick $file -interpolate Nearest -filter point -resize $size $out | |
} | |
function Reload-Profile { | |
. $PROFILE | |
} | |
function Push-Origin() { | |
$branchname = (git rev-parse --abbrev-ref HEAD) | |
git push --set-upstream origin $branchname | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment