Skip to content

Instantly share code, notes, and snippets.

@o9-9
o9-9 / Game-Configs.ps1
Created July 30, 2025 16:00
Game-Configs
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator"))
{Start-Process PowerShell.exe -ArgumentList ("-NoProfile -ExecutionPolicy Bypass -File `"{0}`"" -f $PSCommandPath) -Verb RunAs
Exit}
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + " (Administrator)"
$Host.UI.RawUI.BackgroundColor = "Black"
$Host.PrivateData.ProgressBackgroundColor = "Black"
$Host.PrivateData.ProgressForegroundColor = "White"
Clear-Host
function show-menu {
@o9-9
o9-9 / ws_setup.ps1
Created July 25, 2025 06:46
This PowerShell script will setup a fresh workstation with everything needed to sucessfully work and be a DevOps Master day-to-day.
#region installs
# This PowerShell script will setup a fresh workstation with everything needed to sucessfully work and be a DevOps Master day-to-day.
# core tech choco installs
$script:chocoCoreTech = @(
# 'vscode' # visual studio code
# 'python' # python
# '7zip' # file archiver with good compression ratio
# 'git' # git for windows
# 'firefox' # firefox browser
)
@o9-9
o9-9 / o9.omp.yml
Last active July 25, 2025 06:43
My oh-my-posh custom theme in yaml format
$schema: https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
blocks:
- segments:
- type: aws
style: diamond
# powerline_symbol: 
# powerline_symbol: " \u03BB"
leading_diamond: 
trailing_diamond: 
foreground: "#faa029"
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
// {
// "type": "text",
// "style": "plain",
@o9-9
o9-9 / powershell.json
Last active July 25, 2025 06:39
Collection of PowerShell Snippets for VSCode
"Help": {
"prefix": "help",
"body": [
"<#",
".SYNOPSIS",
"\tShort description",
".DESCRIPTION",
"\tLong description",
".EXAMPLE",
"\tC:\\PS>",
#region functions
function Convert-PSToVSCodeSnippet {
<#
.SYNOPSIS
Converts PowerShell Code to VSCode snippet format
.DESCRIPTION
Leverages the ConvertTo-VSCodeSnippet script available on PSGallery to convert PowerShell code to properly formatted VSCode snippet JSON
.EXAMPLE
Convert-PSToVSCodeSnippet -Name 'MySnippet' -Body $body -Prefix 'MyPrefix' -Description 'MyDescription'
@o9-9
o9-9 / python.json
Last active July 25, 2025 06:38
Collection of Python Snippets for VSCode
{
"if": {
"prefix": "if",
"body": ["if ${1:expression}:", "\t${2:pass}"],
"description": "Code snippet for an if statement"
},
"if/else": {
"prefix": "if/else",
"body": ["if ${1:condition}:", "\t${2:pass}", "else:", "\t${3:pass}"],
"description": "Code snippet for an if statement with else"
@o9-9
o9-9 / settings.json
Last active July 25, 2025 06:39
Current Windows Terminal Settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@o9-9
o9-9 / profile.ps1
Last active July 25, 2025 06:11
PowerShell Prompt
#Requires -Version 7
# Version 1.2.13
# check if newer version
$gistUrl = "https://api.github.com/gists/c9c7e62ae280acb5c5833b6aac1cebf8"
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
if ([System.IO.File]::Exists($latestVersionFile)) {
@o9-9
o9-9 / settings.json
Last active July 25, 2025 06:37
Visual Studio Code User Settings that I currently use. Heavy focus on PowerShell, Python, AWS, and Azure.
{
//USEFUL INFORMATION
//https://code.visualstudio.com/docs/editor/settings-sync
//https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions
//https://github.com/microsoft/cascadia-code/blob/master/README.md
//https://github.com/adam7/delugia-code/releases
// @installed
// @category:"themes"
// @popular
//SYNC SETTINGS