Skip to content

Instantly share code, notes, and snippets.

@maksha
Last active July 25, 2017 07:48
Show Gist options
  • Save maksha/cff3de229c4a2df201af5ac1bbabbd91 to your computer and use it in GitHub Desktop.
Save maksha/cff3de229c4a2df201af5ac1bbabbd91 to your computer and use it in GitHub Desktop.
Posh-Git PowerShell Prompt
# Import module posh-git
Import-Module -Name posh-git
# Setup awesome PS prompt
function Test-Administrator {
$user = [Security.Principal.WindowsIdentity]::GetCurrent();
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
function prompt {
$realLASTEXITCODE = $LASTEXITCODE
Write-Host
# Reset color, which can be messed up by Enable-GitColors
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor
if (Test-Administrator) { # Use different username if elevated
Write-Host "(Elevated) " -NoNewline -ForegroundColor White
}
Write-Host " $ENV:USERNAME " -NoNewline -ForegroundColor White -BackgroundColor DarkGray
if ($s -ne $null) { # color for PSSessions
Write-Host " (`$s: " -NoNewline -ForegroundColor DarkGray
Write-Host "$($s.Name)" -NoNewline -ForegroundColor Yellow
Write-Host ") " -NoNewline -ForegroundColor DarkGray
}
Write-Host "" $($(Get-Location) -replace ($env:USERPROFILE).Replace('\','\\'), "~") "" -NoNewline -ForegroundColor Black -BackgroundColor Gray
$global:LASTEXITCODE = $realLASTEXITCODE
Write-Host
Write-Host " " ($([char]0x2192)) " " -NoNewline -BackgroundColor DarkGray
Write-VcsStatus
return "> "
}
@maksha
Copy link
Author

maksha commented Jan 12, 2017

LICEcap

http://www.cockos.com/licecap/

A simple animated screen captures * LICEcap can capture an area of your desktop and save it directly to .GIF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment