Skip to content

Instantly share code, notes, and snippets.

View brucebentley's full-sized avatar

Bruce Bentley brucebentley

View GitHub Profile
@zcemycl
zcemycl / README.md
Last active July 25, 2025 10:50
Windows Setup to use WSL Ubuntu Pyenv Poetry

Install Ubuntu wsl2 in Windows

  1. Enable SVM in BIOs of your PC.
  2. Enable WSL in Windows.
  3. Update WSL to latest version such that it has manage option.
  4. Move WSL to your favorite Drive.
  5. Install Ubuntu via wsl --install Ubuntu-xx.xx.
  6. Install apt packages before getting pyenv.
    sudo apt-get install libssl-dev libffi-dev liblzma-dev python3-tk tk-dev libreadline-dev bzip2
    
@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:

Linux based Python enviroment for Windows systems using WSL

The following document will guide you through to install WSL, Ubuntu distro, python,pyenv and poetry

Install WSL and Linux Distro for Windows Machine

If you are using Linux based system skip these steps for installing wsl & Ubuntu

  1. First you need to Make sure your Windows version is at least Windows 10, version 2004. You can check your Windows version by going to Settings > System > About.
@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 June 2, 2025 13:42
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)"