- Install Chocolatey
choco install boxstarter -y
- open "Boxstarter Shell"
- create "Portable Boxstarter" see wiki
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
<# | |
.SYNOPSIS | |
BoxStarter script to configure Windows 10 development PC. | |
.DESCRIPTION | |
You might need to set: | |
Set-ExecutionPolicy RemoteSigned | |
Set-ExecutionPolicy Unrestricted | |
Set-ExecutionPolicy Bypass |
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
choco install pwsh -y | |
choco install ripgrep -y | |
choco install vscode -y | |
Get-WindowsCapability -Online | Where-Object {$_.Name -like 'OpenSSH*'} | Add-WindowsCapability -Online | |
Start-Service sshd | |
Set-Service sshd -StartupType Automatic | |
Stop-Service sshd |
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
# NuGet package provider. Do this early as reboots are required | |
if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) { | |
Write-Host "Install-PackageProvider" | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope AllUsers -Confirm:$False | |
# Exit equivalent | |
Invoke-Reboot | |
} |
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
[cmdletbinding()] | |
param( | |
$packageName | |
) | |
$ErrorActionPreference = 'Stop' | |
function Test-TransitiveDependencies { | |
[cmdletbinding()] | |
param($allPackages, $pkgID) |
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
function Get-UglyButShortUniqueDirname { | |
[CmdletBinding()] | |
param ( | |
) | |
$t = "$([System.Guid]::NewGuid())".Replace("-", "") | |
Write-Verbose "base guid: $t" | |
$t = "$(0..$t.Length | % { if (($_ -lt $t.Length) -and !($_%2)) { [char][byte]"0x$($t[$_])$($t[$_+1])" } })".replace(" ", "").Trim() |
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
wget https://download.foldingathome.org/releases/public/release/fahclient/debian-testing-64bit/v7.4/fahclient_7.4.4_amd64.deb | |
wget https://download.foldingathome.org/releases/public/release/fahcontrol/debian-testing-64bit/v7.4/fahcontrol_7.4.4-1_all.deb | |
wget https://download.foldingathome.org/releases/public/release/fahviewer/debian-testing-64bit/v7.4/fahviewer_7.4.4_amd64.deb | |
sudo dpkg -i --force-depends fahclient_7.4.4_amd64.deb | |
sudo dpkg -i --force-depends fahcontrol_7.4.4-1_all.deb | |
sudo dpkg -i --force-depends fahviewer_7.4.4_amd64.deb |
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
function Add-TrustedHostDownloadSite { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true)] | |
[string]$ServerName, | |
[Parameter(Mandatory = $false)] | |
[string]$Domain = "myorg.somedomain" | |
) | |
Push-Location |
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
function Get-EvilCmdLet { | |
[CmdletBinding()] | |
param( | |
[ValidateSet('A', 'B')] | |
$Category | |
) | |
Write-Output "= Get-EvilCmdLet =" | |
Write-Output "* PSBoundParameters" | |
$PSBoundParameters.Keys | % { |
NewerOlder