git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
foreach($level in "Machine","User") { | |
[Environment]::GetEnvironmentVariables($level).GetEnumerator() | % { | |
# For Path variables, append the new values, if they're not already in there | |
if($_.Name -match 'Path$') { | |
$_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -split ';' | Select -unique) -join ';' | |
} | |
$_ | |
} | Set-Content -Path { "Env:$($_.Name)" } | |
} |
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
function Update-PesterTest { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] | |
[Alias('FullName')] | |
[String]$Path | |
) | |
begin { | |
$shouldParams = [String[]](Get-Command Should).Parameters.Keys |
function Start-Demo { | |
[CmdletBinding()] | |
param( | |
# A history file with a command on each line (or using ` as a line-continuation character) | |
[Parameter(Mandatory)] | |
[Alias("PSPath")] | |
[string]$Path | |
) | |
[Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory() |
function New-TypeDefinitionFromCsv { | |
param( | |
[Parameter(Mandatory)] | |
[string] $Path, | |
[ValidatePattern("\w[\w\d_-]*", ErrorMessage = "The typename must be a valid name of an Identifier.")] | |
[string] $NameOfGeneratedType, | |
[ArgumentCompletions('";"', '"`t"', '","')] | |
[string] $Delimiter = ',', | |
[Type[]] $ColumnType, | |
[switch] $CSharp |