Skip to content

Instantly share code, notes, and snippets.

View brucebentley's full-sized avatar

Bruce Bentley brucebentley

View GitHub Profile
@TheGU
TheGU / SetupWin11.ps1
Last active January 20, 2025 10:28
Auto setup new win11 pc for development.
# =============
# Run terminal as admin, then run 'powershell.exe -ExecutionPolicy Unrestricted'
# to start powershell session in unrestricted mode
# https://learn.microsoft.com/th-th/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
# get all input parameter
$computerName = Read-Host 'Change Computer Name from [' $env:COMPUTERNAME '] to (blank to skip) '
$monitorTimeout = Read-Host 'Set monitor timeout to __ second (blank to skip) '
@ysichrisdag
ysichrisdag / Terminal_WinSrv.ps1
Last active January 23, 2025 17:42 — forked from likamrat/Terminal_WinSrv.ps1
Install Windows Terminal on Windows Server
Write-Information "This script needs be run on Windows Server 2019 or 2022"
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" }
# Define environment variables
$downloadDir = "C:\WinTerminal"
$gitRepo = "microsoft/terminal"
$filenamePattern = "*.msixbundle"
$framworkPkgUrl = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
$framworkPkgPath = "$downloadDir\Microsoft.VCLibs.x64.14.00.Desktop.appx"
$xamlPkgUrl = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.x64.appx"
@lioneltchami
lioneltchami / Jenkinsetup.sh
Last active August 13, 2023 14:59
Setting up our Servers
#!/bin/bash
sudo apt update
sudo apt install openjdk-11-jdk -y
sudo apt install maven -y
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \
/usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
@likamrat
likamrat / Terminal_WinSrv.ps1
Last active January 23, 2025 17:42
Install Windows Terminal on Windows Server
Write-Information "This script needs be run on Windows Server 2019 or 2022"
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" }
# Define environment variables
$downloadDir = "C:\WinTerminal"
$gitRepo = "microsoft/terminal"
$filenamePattern = "*.msixbundle"
$framworkPkgUrl = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
$framworkPkgPath = "$downloadDir\Microsoft.VCLibs.x64.14.00.Desktop.appx"
$msiPath = "$downloadDir\Microsoft.WindowsTerminal.msixbundle"
@alkuzad
alkuzad / destroy_and_GECK_docker_desktop.ps1
Last active March 16, 2025 23:08
Restart script to restart WSL, DockerDesktop and LxssManager. This script should unblock blocked wsl/docker-desktop.
# MIT License
# Copyright (c) 2023 Dawid Goslawski
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@vctls
vctls / theme_switch.ps1
Created November 20, 2022 12:31
Powershell script to switch both app and system Windows light/dark theme
# Switch Windows light/dark theme
$regkey = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
$appProp = "AppsUseLightTheme"
$sysProp = "SystemUsesLightTheme"
$currVal = Get-ItemProperty -Path $regKey -Name $appProp | Select-Object -exp $appProp
$newVal = !$currVal + 0;
Set-ItemProperty -Path $regKey -Name $appProp -Value $newVal -Type Dword -Force;
Set-ItemProperty -Path $regKey -Name $sysProp -Value $newVal -Type Dword -Force;
@shanselman
shanselman / setupmachine.bat
Last active March 24, 2025 16:20
WinGet Setup a New Machine
mkdir c:\github
winget install --id=Git.Git -e --accept-package-agreements --accept-source-agreements
winget install --id=Microsoft.VisualStudioCode -e
winget install --id=AgileBits.1Password -e
winget install --id=7zip.7zip -e
winget install --id=Twilio.Authy -e
winget install --id=Bethesda.Launcher -e
winget install --id=Microsoft.Bicep -e
winget install --id=Microsoft.bitsmanager -e
winget install --id=BrutalChess.BrutalChess -e
@fullmetalbrackets
fullmetalbrackets / zsh-install.md
Last active December 21, 2024 20:09
Quick Guide - install zsh + oh-my-zsh w/ plugins & powerlevel10k theme

Install Zsh

sudo apt install zsh -y

Install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@brucebentley
brucebentley / Connecting Docker cli and Kubectl to Docker Desktop for Windows.md
Last active December 5, 2021 15:47
Setup your Windows 10 & WSL development environment(s) so that you're able to use all the various Kubernetes tooling.
@itoleck
itoleck / Install WinGet Software
Last active January 13, 2025 16:31
WinGetInstalls
Start /WAIT /B Winget install "Microsoft.PowerShell.Preview" --force --accept-package-agreements --accept-source-agreements
Start /WAIT /B Winget install "Microsoft.WindowsTerminal" --force --accept-package-agreements --accept-source-agreements
Start /WAIT /B Winget install "Microsoft XNA Framework Redistributable Refresh" --force --accept-package-agreements --accept-source-agreements &REM *Needs alone time, no other install*
Start /WAIT /B Winget install "Microsoft.VisualStudio.2022.Community" --force --accept-package-agreements --accept-source-agreements
REM Install all of the VC++ Redistributables
Start /WAIT /B Winget install "Microsoft Visual C++ 2005 Redistributable" --force --accept-package-agreements --accept-source-agreements
Start /WAIT /B Winget install "Microsoft Visual C++ 2005 Redistributable (x64)" --force --accept-package-agreements --accept-source-agreements
Start /WAIT /B Winget install "Microsoft Visual C++ 2008 Redistributable - x64" --force --accept-package-agreements --accept-source-ag