Instantly share code, notes, and snippets.

View Microsoft.PowerShell_profile.ps1
Function gig {
$params = $list -join ","
Invoke-WebRequest -Uri "$params" | select -ExpandProperty content | Out-File -FilePath $(Join-Path -path $pwd -ChildPath ".gitignore") -Encoding ascii
View web.config
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)/$" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
import redis
r = redis.StrictRedis(host='[cache-name]', port=6380, db=0, password='[access-key]', ssl=True)
result = r.get('foo')
print result
View .user.antixss.ini
;Read more:
View Create-Primary-Environment.ps1
function Get-ScriptDirectory {
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
$FunctionToRegister = Join-Path (Get-ScriptDirectory) "setup\Invoke-AzureEnvironmentSetup.ps1"
. "$FunctionToRegister"
#### Primary Environment
$EnvironmentSubscriptionName = "Primary Subscription Name"
View Clear-WebPICache.ps1
gci -Force "$env:localappdata\Microsoft\Web Platform Installer" | Remove-Item -Recurse -Force
gci -Force "$env:appdata\Microsoft\Web Platform Installer" | Remove-Item -Recurse -Force
View PostBuildEvent
rem Replace [WebProjectName] with the name of your Web Application project name
xcopy "$(TargetDir)*.*" "$(SolutionDir)[WebProjectName]\App_Data\jobs\continuous\$(ProjectName)\" /y
View composer.json
"require": {
"guzzle/guzzle": "~3.1"
View Microsoft.PowerShell_profile.ps1
# It's your choice if you want to enter the code and press the button.
# >: 4 8 15 16 23 42
function prompt {
write-host '>:' -nonewline
return ' '

Changing color settings in Poshgit

  1. Navigate to the Poshgit Install Directory

    • [Chocolatey] C:\tools\Poshgit\dahlbyk-posh-git-9d624ca\
    • [Local User] %UserProfile%\Documents\WindowsPowerShell\Modules\Poshgit
    • [System] %windir%\System32\WindowsPowerShell\Modules\Poshgit
  2. Right-Click on GitPrompt.ps1 and select Edit

  3. Between line 5 and 39 you will find all of the colour settings