Skip to content

Instantly share code, notes, and snippets.

View realchrisolin's full-sized avatar

Chris Olin realchrisolin

View GitHub Profile
@realchrisolin
realchrisolin / sshd-ts-setup.ps1
Last active September 1, 2026 02:17
vibe coded slop
# Windows OpenSSH Server locked to Tailscale only.
# Log only — never prints authorized_keys contents.
$ErrorActionPreference = 'Stop'
$log = 'C:\Users\%username%\AppData\Local\Temp\sshd-ts-setup.log'
$cfg = 'C:\ProgramData\ssh\sshd_config'
$ak = 'C:\ProgramData\ssh\administrators_authorized_keys'
$expected4 = '100.x.x.x'
$expected6 = 'xxxx:xxxx:xxxx::xxxx:xxxx'
$tsExe = 'C:\Program Files\Tailscale\tailscale.exe'
You are a senior DevOps and AI systems architect specialized in the Hermes Agent architecture. Your task is to act as an authoritative engineering advisor and generate an exhaustive, production-grade architectural blueprint detailing the implementation of current best practices for personal deployment.
Provide an exceptionally deep, highly technical, and actionable breakdown structured into the following five core pillars. For every single section, you must provide the exact configuration files, system design schemas, terminal commands, and edge-case mitigations needed to make it fully operational.
---
### 1. HUB-AND-SPOKE PROFILE ARCHITECTURE
* **Directory Topology:** Map out a clean local directory structure (e.g., `~/.config/hermes/`) demonstrating exactly how the `default` orchestrator profile, a `coder` profile, and an `infra-ops` profile remain physically isolated.
* **CLI Lifecycle Commands:** Provide the exact CLI command sequences to initialize, clone, list, switch, and cleanly decommission profi
@realchrisolin
realchrisolin / get_selected_face.py
Created June 28, 2026 12:46
solidworks COM API utility scripts
"""Find the selected face + any face named 'debug face' via Entity Properties."""
import win32com.client as wc
import pythoncom
import sys
pythoncom.CoInitialize()
swApp = wc.Dispatch("SldWorks.Application")
swModel = swApp.ActiveDoc
if not swModel:
from lumibot.strategies.strategy import Strategy
from lumibot.backtesting import YahooDataBacktesting,ThetaDataBacktesting
from datetime import datetime
import os
import pandas as pd
import logging
import httpx
from io import StringIO
logger = logging.getLogger("lumibot.strategies.strategy")
@realchrisolin
realchrisolin / InstallHPUniversalPrinterDriver.ps1
Last active May 20, 2026 19:47
Powershell script to install HP Universal Printer Driver silently / unattended
# Setup temp directory
$prep_dir = "C:\Windows\Temp"
if (-not (Test-Path $prep_dir)) {
New-Item -Path $prep_dir -ItemType Directory -Force | Out-Null
}
Start-Transcript -Path "$($prep_dir)\InstallHPUniversalPrinterDriver.log"
# Find the latest UPD archive file based on version
$updArchives = Get-ChildItem -Path . -Filter "upd-pcl6-x64-*.zip"
@realchrisolin
realchrisolin / script.ps1
Created April 21, 2025 13:05
fetch and install Windows Updates using COM API objects in powershell
# Copy and paste this script into an admin powershell window
# or download it and call it with powershell.exe -ExecutionPolicy Bypass -File /path/to/script.ps1
# API documentation can be found at https://learn.microsoft.com/en-us/windows/win32/wua_sdk/portal-client
# Create a Windows Update session and searcher
$Session = New-Object -ComObject Microsoft.Update.Session
$Searcher = $Session.CreateUpdateSearcher()
# Search for updates with progress
@realchrisolin
realchrisolin / reference.ps1
Created February 18, 2025 18:53
Powershell / CMD Sysadmin Cheatsheet of Awesome
Set-LocalUser -Name "$user" -Password (ConvertTo-SecureString "examplepassword123" -AsPlainText -Force)
@realchrisolin
realchrisolin / script.ps1
Last active February 20, 2025 14:38
fetch combined successful interactive and non-interactive M365 sign-ins for the last month via Graph API
# This script is meant to be run directly in a powershell 7 shell (parts of it are not powershell 5 compatible)
# ADJUST THE FILTER STRING TO PULL THE SIGN-IN RECORDS YOU WANT FIRST, DO NOT ASSUME IT WILL WORK OUT-OF-THE-BOX
Import-Module Microsoft.Graph.Authentication
Import-Module Microsoft.Graph.Beta.Reports
try {
Connect-MgGraph -Scopes "AuditLog.Read.All", "Organization.Read.All", "Policy.Read.All" -ContextScope Process
Write-Host "Successfully connected to Microsoft Graph" -ForegroundColor Green
$tenantName = Get-MgBetaOrganization | Where-Object { $_.Id -eq $($(Get-MgContext).TenantId) } | Select-Object -ExpandProperty DisplayName
This file has been truncated, but you can view the full file.
{
"openapi": "3.0.1",
"info": {
"title": "Connectwise Manage Public Endpoints",
"version": "2024.13"
},
"servers": [
{
"url": "http://na.myconnectwise.net/v4_6_release/apis/3.0"
}
This file has been truncated, but you can view the full file.
{
"openapi": "3.0.1",
"info": {
"title": "Connectwise Manage Public Endpoints",
"version": "2024.13"
},
"servers": [
{
"url": "http://na.myconnectwise.net/v4_6_release/apis/3.0"
}