Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / make-image.sh
Created September 29, 2025 14:59
make a dual boot a/b image with grub2 ubuntu debian
#!/bin/bash
# set -euo pipefail
set -x
sudo apt-get update && sudo apt-get install -y debootstrap qemu-utils
echo "create and partition disk image..."
. ./vars.sh
@cicorias
cicorias / resetWUS.ps1
Created September 17, 2025 12:19
Because windows 11 sucks i need this all the time
<#
Reset-WindowsUpdate.ps1 (fixed interpolation)
Run from an elevated PowerShell window.
#>
# --- Guard: must be admin ---
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()
).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
Write-Error "Run this script from an elevated PowerShell (Run as administrator)."
exit 1
@cicorias
cicorias / addnetwork.sh
Last active August 21, 2025 10:42
setting up RDP for Ubuntu Server 24.04
sudo ip addr flush dev eth0
sudo ip addr add 10.1.1.1/24 dev eth0
sudo ip link set eth0 up
sudo ip route add default via 10.1.1.1

Beast Mode v3

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
  • Select "User Data Folder"
  • Give it a name (Beast Mode)
@cicorias
cicorias / verifyPermissions.sh
Created July 18, 2025 13:55
script that runs a check after a terraform refresh or apply checking RBAC assignments
#!/usr/bin/env bash
set -e
getcosmos=$(terraform output -raw list_cosmos_container_permissions_command)
echo $getcosmos
$getcosmos
getaks=$(terraform output -raw list_role_assignments_aks_command)
echo "$getaks"
eval $getaks
@cicorias
cicorias / verifyPermissions.sh
Created July 18, 2025 13:52
Script that validates a function application in azure managed identity to cosmos container
#!/bin/bash
set -epu
# This script verifies that the managed identity associated with the Function App has the correct role assignment for the Cosmos SQL account.
# Check if jq and az cli are installed
if ! command -v jq &> /dev/null
then
echo "jq could not be found. Please install jq."
exit
@cicorias
cicorias / cleanrg.cs
Created June 16, 2025 23:16 — forked from davidfowl/cleanrg.cs
A C# tool for cleaning up resource groups
// -----------------------------------------------------------------------------
// Azure RG Janitor - Spectre Edition
// Run with: dotnet run cleanup-rg.cs
// Targets: .NET 10 Preview 4+
// -----------------------------------------------------------------------------
#:package Azure.Identity@1.*
#:package Azure.ResourceManager@1.*
#:package Spectre.Console@0.50.0
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N (1 << 21) // 2^21
void loop_stride_256(int *a) {
for (int i = 0; i < N; i += 256) {
a[i]++;
}
@cicorias
cicorias / delta.ipynb
Last active January 31, 2025 21:46
Delta Tables in Python with delta-io delta-rs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cicorias
cicorias / #emulate-managed-identity.md
Created January 26, 2025 13:19 — forked from maskati/#emulate-managed-identity.md
Emulate Azure managed identity locally