These files can be placed at the root of a solution to impact all projects within that solution
- Customize the build by folder
- Central Package Management (CPM)
- CentralisedPackageConverter Use this to convert existing projects to CPM
@rem bat file to ease use of powershell script | |
@%~d0 | |
@cd "%~dp0" | |
powershell.exe -ExecutionPolicy RemoteSigned -NoLogo -NonInteractive -NoProfile -file "%~dpn0.ps1" -Path "%~1" | |
@pause |
Clear-Host | |
if (!(Get-Module Join-Object)) { | |
Install-Module -Name Join-Object -Force -AllowClobber -Scope CurrentUser | |
} | |
$tcpConnections = Get-NetTCPConnection | |
# list all ports processes: | |
$processes = Get-Process -Id ($tcpConnections).OwningProcess -IncludeUserName |
Clear-Host | |
if (!(Get-PackageSource -Name Nuget)) { | |
Register-PackageSource -provider NuGet -name Nuget -location "https://www.nuget.org/api/v2" | |
} | |
$remotePackage = Find-Package NuGet.CommandLine -ProviderName Nuget | |
$localPackage = Get-Package NuGet.CommandLine | |
if (!$localPackage -or $remotePackage.Version -gt $localPackage.Version) { |
utils = { | |
GetUserInfoPromise: function() { | |
return new Promise((resolve, reject) => { | |
// have to use a promise as sendrequest is async if we want to use the response | |
const postman_api_key = pm.globals.get('postman_api_key'); | |
pm.sendRequest({ | |
url: 'https://api.getpostman.com/me', | |
method: 'GET', | |
header: { | |
'X-API-Key': postman_api_key, |
C:\Windows\System32\inetsrv\appcmd.exe list site |
These files can be placed at the root of a solution to impact all projects within that solution
Clear-Host | |
$folders = [IO.Directory]::EnumerateDirectories("**PATH**") | |
$branches = "dev", "qa", "staging", "master" | |
foreach ($folder in $folders) { | |
Set-Location $folder | |
if (!(Get-ChildItem -Path ".git" -Directory -ErrorAction SilentlyContinue)) { | |
continue | |
} |
If you've changed the case of a file name in Git and can't undo the changes, it's likely that Git isn't recognizing the change as a rename. Here's how to fix it:
Method 1: Using git mv
git mv NewFileName.txt oldfilename.txt
git commit -m "Fix case sensitivity issue"
Method 2: Force a rename
Rename the file to a temporary name:
$Utf8NoBomEncoding = [System.Text.UTF8Encoding]::new($false); | |
Get-ChildItem -Path "." -Recurse -File | | |
Where-Object { $_.FullName -inotmatch "\\bin\\|\\obj\\"} | | |
ForEach-Object { | |
Write-Output $_.FullName; | |
$content = [IO.File]::ReadAllLines($_.FullName); | |
[IO.File]::WriteAllLines($_.FullName, $content, $Utf8NoBomEncoding); | |
} |
#Requires -RunAsAdministrator | |
Clear-Host | |
$deleteDate = (Get-Date).AddMonths(-2) | |
$counter = 0 | |
# https://port135.com/remove-older-files-machinekeys/ | |
# Back up the three files below. These files are used by IIS. It’s important to back them up before removing any files from MachinkeKeys folder. | |
# | |
# 6de9cb26d2b98c01ec4e9e8b34824aa2_GUID iisConfigurationKey |