Skip to content

Instantly share code, notes, and snippets.

View JosiahSiegel's full-sized avatar
🌌

Josiah Siegel JosiahSiegel

🌌
View GitHub Profile
@JosiahSiegel
JosiahSiegel / .config\opencode\oh-my-openagent.json
Last active June 26, 2026 00:40
oh-my-openagent manifest config
{
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
"agents": {
"sisyphus": {
"model": "manifest/orchestrate",
"fallback_models": [{ "model": "manifest/deep" }],
"max_tokens": 250000,
"prompt_append": "If a task requires inspecting images, screenshots, PDFs, diagrams, or other media, do not analyze it directly. Use the look_at tool or delegate to multimodal-looker. If a task involves UI, frontend, visual design, styling, screenshots, or visual QA, delegate to category visual-engineering."
},
"hephaestus": {
@JosiahSiegel
JosiahSiegel / index.html
Created May 31, 2026 22:51
Peanut Patch Squirrel Exclusion — Three Methods
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Peanut Patch Squirrel Exclusion — Three Methods</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
@JosiahSiegel
JosiahSiegel / settings.json
Created May 8, 2026 13:58
Claude Code with Manifest Router
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"env": {
"ANTHROPIC_BASE_URL": "https://app.manifest.build",
"ENABLE_TOOL_SEARCH": "auto:10",
"ANTHROPIC_CUSTOM_MODEL_OPTION": "manifest/auto",
"ANTHROPIC_CUSTOM_MODEL_OPTION_NAME": "Manifest Auto",
"ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION": "Routed through app.manifest.build",
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "32000",
"MAX_THINKING_TOKENS": "10000"
@JosiahSiegel
JosiahSiegel / usp_ConfigureSecurity.sql
Created March 26, 2026 22:11
SQL Instance Permissions Management
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ============================================================================
-- Table type for the security matrix TVP
-- Must drop SP first (it references the type), then drop/recreate the type.
-- ============================================================================
IF EXISTS (SELECT 1 FROM sys.procedures WHERE name = 'usp_ConfigureSecurity' AND schema_id = SCHEMA_ID('dbo'))
@JosiahSiegel
JosiahSiegel / best_query_plans.sql
Last active January 21, 2026 21:33
Get best query plans
/*
-- get query id
SELECT
q.query_id,
qt.query_sql_text
FROM sys.query_store_query_text qt
INNER JOIN sys.query_store_query q ON
qt.query_text_id = q.query_text_id
WHERE query_sql_text like N'%select top 1%'
*/
@JosiahSiegel
JosiahSiegel / rg_rbac_assignments.sh
Created December 16, 2025 14:36
Get User's Azure Resource Group RBAC Assignments
az role assignment list --assignee <USER_OBJECT_ID> --all --include-inherited --include-groups -o json | jq -r '["| Resource Group | Roles |", "|----------------|-------|"] + ([.[] | select(.scope | test("/resourceGroups/[^/]+$") or test("/subscriptions/[^/]+$") or test("/managementGroups/")) | {rg: (.resourceGroup // "Subscription-level"), role: .roleDefinitionName}] | group_by(.rg) | map({rg: .[0].rg, roles: (map(.role) | unique | sort | join(", "))}) | sort_by(.rg) | map("| \(.rg) | \(.roles) |")) | .[]'
@JosiahSiegel
JosiahSiegel / manage_mirroring.sql
Created October 23, 2025 20:10
Azure SQL Database - Manage Mirroring
EXECUTE sys.sp_help_change_feed;
EXECUTE sys.sp_help_change_feed_table @source_schema = 'dbo', @source_name = 'users'
EXECUTE sys.sp_help_change_feed_settings;
EXECUTE sys.sp_help_change_feed_table_groups;
--Destroy mirroring from database end:
--EXECUTE sys.sp_change_feed_disable_db;
@JosiahSiegel
JosiahSiegel / Move-SqlDatabaseFiles.ps1
Created October 3, 2025 15:12
Move SQL Server Database Files
<#
.SYNOPSIS
Moves SQL Server database files to target drives with step-by-step DBA confirmation.
.DESCRIPTION
This script moves SQL Server database files from their current locations to specified target paths.
It processes databases one at a time, prompting for DBA confirmation at each step.
The script handles both physical file movement and SQL Server metadata updates.
.PARAMETER ServerInstance
@JosiahSiegel
JosiahSiegel / mysql_quick_analysis.sql
Created August 25, 2025 22:07
MySQL Quick Analysis
SELECT
ROW_NUMBER() OVER (ORDER BY section_order, priority) AS row_num,
section, metric, user_info, value, details, status,
query_text, problem_indicator
FROM (
-- SECTION 1: BLOCKING CHAINS AND LOCK ISSUES
(SELECT
1 as section_order, 1 as priority,
'BLOCKING' as section,
'Lock Chain' as metric,
@JosiahSiegel
JosiahSiegel / mysql_password_guide.md
Created August 18, 2025 13:24
MySQL Password Reset Guide for Azure MySQL Flexible Server

MySQL Password Reset Guide for Azure MySQL Flexible Server

Understanding One-Time Password Expiration and Mandatory Reset

This guide explains the complete process of forcing users to reset their password on first login using MySQL's password expiration feature. It addresses the seemingly counterintuitive requirement that users must login with their expired password to change it.


🔑 Why Users Must Login with an Expired Password