Skip to content

Instantly share code, notes, and snippets.

View itoleck's full-sized avatar
🏠
Working from home

Chad Schultz itoleck

🏠
Working from home
View GitHub Profile
@itoleck
itoleck / Install python.ps1
Last active May 17, 2024 23:10
Install python
#Install Python Windows store version
choco install python
#Install pyenv-win
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
#Setup env vars and path
[System.Environment]::SetEnvironmentVariable('PYENV',$env:USERPROFILE + "\.pyenv\pyenv-win\","User")
[System.Environment]::SetEnvironmentVariable('PYENV_ROOT',$env:USERPROFILE + "\.pyenv\pyenv-win\","User")
[System.Environment]::SetEnvironmentVariable('PYENV_HOME',$env:USERPROFILE + "\.pyenv\pyenv-win\","User")
@itoleck
itoleck / ChocolateyInstalls.ps1
Last active January 17, 2024 03:38
Chocolatey Installs
# Windows Server does not have Winget so maybe moving to Choco instead
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
cmd.exe -c start powershell.exe
# First install frameworks
choco install dotnet-all -y
choco install powershell-preview -y
choco install vcredist-all -y
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true,
"transient_prompt": {
"background": "transparent",
"foreground": "#ffffff",
"template": "{{ .Shell }}> "
},
"blocks": [
{
#Autoinstall the PowerShell profiles from my Gist
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/itoleck/UltimatePowerShellProfile/main/Microsoft.PowerShell_profile.ps1'))
#Font has to be changed in Windows Terminal for each profile to CaskaydiaCove Nerd Font
#Oh-my-posh for PowerShell
oh-my-posh prompt init powershell --config $env:APPDATA\Local\Programs\oh-my-posh\themes\agnoster.omp.json | Invoke-Expression
#Oh-my-posh for cmd
oh-my-posh prompt init cmd --config $env:APPDATA\Local\Programs\oh-my-posh\themes\agnoster.omp.json | Invoke-Expression
REM Hard link to Z: drive for symbols
mklink /D c:\symbols z:\symbols
mklink /D c:\symcache z:\symcache
REM Set environment variables
setx _NT_SYMBOL_PATH /m cache*c:\symbols;SRV*https://chromium-browser-symsrv.commondatastorage.googleapis.com;SRV*https://msdl.microsoft.com/download/symbols;SRV*https://download.amd.com/dir/bin;SRV*https://driver-symbols.nvidia.com/;SRV*https://software.intel.com/sites/downloads/symbols/;SRV*http://ctxsym.citrix.com/symbols
setx _NT_SYMCACHE_PATH /m c:\symcache
REM Set these if you want extra logging enabled
REM setx DBGHELP_DBGOUT 1
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema-preview",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
#Ctrl-Scroll-Scroll
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\i8042prt\Parameters" -Name "CrashOnCtrlScroll" -Value 1 -PropertyType "DWORD" -Force
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\kbdhid\Parameters" -Name "CrashOnCtrlScroll" -Value 1 -PropertyType "DWORD" -Force
#Perfmon PIDs
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\PerfProc\Performance" -Name "ProcessNameFormat" -Value 2 -PropertyType "DWORD" -Force
#Show Win11 Menu
REG ADD "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
@itoleck
itoleck / Download Files to install
Last active May 17, 2024 22:13
Download Files to install
Invoke-WebRequest -Uri "https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/CascadiaCode/Regular/CaskaydiaCoveNerdFont-Regular.ttf" -OutFile "$env:USERPROFILE\Downloads\Caskaydia Cove Regular Nerd Font Complete.otf"
#Repo for CascadiaCode Font
#Invoke-WebRequest -Uri "https://github.com/microsoft/cascadia-code/releases/download/v2111.01/CascadiaCode-2111.01.zip" -OutFile "$env:USERPROFILE\Downloads\CascadiaCode-2111.01.zip"
# 'Install' Sysinternals tools in downloads
Invoke-WebRequest -Uri "https://download.sysinternals.com/files/SysinternalsSuite.zip" -OutFile "$env:USERPROFILE\Downloads\SysinternalsSuite.zip"
Expand-Archive -Path "$env:USERPROFILE\Downloads\SysinternalsSuite.zip" -DestinationPath "$env:USERPROFILE\Downloads\SysinternalsSuite" -Force
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/itoleck/VariousScripts/main/Windows/SysinternalsEulas.reg" -OutFile "$env:userprofile\downloads\SysinternalsEulas.reg"
REG.exe IMPORT "$env:userprofile\downloads\SysinternalsEulas.reg
@itoleck
itoleck / Install WinGet Software
Last active June 26, 2024 20:27
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