Skip to content

Instantly share code, notes, and snippets.

@jimbrig
jimbrig / DevAssociations.xml
Last active June 22, 2025 17:25
Development Related Windows 11 Default File Associations
<?xml version="1.0" encoding="UTF-8"?>
<DefaultAssociations>
<!-- Web Protocols -->
<Association Identifier="http" ProgId="ChromeSSHTM.KRNFTZRS7HSWQNPYUD3H3UQ74E" ApplicationName="Google Chrome Canary" />
<Association Identifier="https" ProgId="ChromeSSHTM.KRNFTZRS7HSWQNPYUD3H3UQ74E" ApplicationName="Google Chrome Canary" />
<!-- Web Files -->
<Association Identifier=".htm" ProgId="ChromeSSHTM.KRNFTZRS7HSWQNPYUD3H3UQ74E" ApplicationName="Google Chrome Canary" />
<Association Identifier=".html" ProgId="ChromeSSHTM.KRNFTZRS7HSWQNPYUD3H3UQ74E" ApplicationName="Google Chrome Canary" />
<Association Identifier=".svg" ProgId="VSCodeInsiders.svg" ApplicationName="Visual Studio Code - Insiders" />
@jimbrig
jimbrig / ascii_banner.R
Created June 11, 2025 01:18
R Banner Generator
ascii_banner <- function(text, font = "slant") {
if (Sys.which("figlet") == "") stop("figlet is not installed.")
system(sprintf("figlet -f %s \"%s\"", font, text), intern = TRUE) |> cat(sep = "\n")
}
@jimbrig
jimbrig / export-chatgpt-md.js
Created June 5, 2025 19:24
Export ChatGPT to Markdown JS
function h(html) {
return html.replace(/<p>/g, '\n\n')
.replace(/<\/p>/g, '')
.replace(/<b>/g, '**')
.replace(/<\/b>/g, '**')
.replace(/<i>/g, '_')
.replace(/<\/i>/g, '_')
.replace(/<code[^>]*>/g, (match) => {
const lm = match.match(/class="[^"]*language-([^"]*)"/);
return lm ? '\n```' + lm[1] + '\n' : '```';
{"name":"Default","settings":"{\"settings\":\"{\\n // ------------------------------------------------\\n // Updates\\n // ------------------------------------------------\\n \\\"update.mode\\\": \\\"start\\\",\\n \\\"update.showReleaseNotes\\\": true,\\n // ------------------------------------------------\\n // Security\\n // ------------------------------------------------\\n \\\"security.workspace.trust.enabled\\\": false,\\n \\\"security.workspace.trust.banner\\\": \\\"never\\\",\\n \\\"security.workspace.trust.emptyWindow\\\": true,\\n \\\"security.workspace.trust.startupPrompt\\\": \\\"never\\\",\\n \\\"security.workspace.trust.untrustedFiles\\\": \\\"open\\\",\\n // ------------------------------------------------\\n // Telemetry\\n // ------------------------------------------------\\n \\\"telemetry.telemetryLevel\\\": \\\"off\\\",\\n \\\"redhat.telemetry.enabled\\\": false,\\n // ------------------------------------------------\\n // Proxy\\
@jimbrig
jimbrig / mcp_client_demo.R
Created May 20, 2025 23:48 — forked from simonpcouch/mcp_client_demo.R
A demo implementation of the MCP client protocol in R
# an example server: acquaint's MCP server for R sessions
r_process <- callr::r_bg(
function() acquaint::mcp_server(),
stdout = "|",
stdin = "|"
)
Sys.sleep(1)
log_cat_client <- function(x, append = TRUE) {
@jimbrig
jimbrig / .env.example
Created May 14, 2025 15:40
Yahoo Fantasy Sports API - Python Scripts
YAHOO_CLIENT_ID=""
YAHOO_CLIENT_SECRET=""
@jimbrig
jimbrig / Workbook.Module.txt
Last active May 6, 2025 16:46
GMH Data Model Workbook Module
// --- Workbook Module ---
// Module containing named range definitions for the GMH Data Model Workbook.
/**
* Get Sheet Names of Current Workbook
*/
Workbook.GetSheetNames = TRANSPOSE(SUBSTITUTE(GET.WORKBOOK(1), "[" & GET.WORKBOOK(16) & "]", ""));
/**
* Define SheetNames
@jimbrig
jimbrig / SQLTools.Module.txt
Last active May 6, 2025 16:44
GMH Data Model SQL Tools Module
// --- SQL Module ---
// Module containing Lambdas for generating SQL DDL Statements.
/**
* Generates SQL ENUM statements from header and values
*/
SQLEnum = LAMBDA(header_cell, values_range,
"CREATE TYPE ""survey""." & CHAR(34) & header_cell & CHAR(34) & " AS ENUM (" & CHAR(10) &
TEXTJOIN("," & CHAR(10), TRUE, " '" & FILTER(values_range, values_range <> "") & "'") & CHAR(10) &
");"
@jimbrig
jimbrig / AddressTools.Module.txt
Last active May 6, 2025 16:45
GMH Data Model Address Module
// --- AddressTools Module ---
// Module containing Lambdas for working with Addresses.
/*
* Extract the Street from an Address
*/
AddressStreet = LAMBDA(address, LEFT(address,FIND(",",address)-1));
/*
* Extract the City from an Adderss
@jimbrig
jimbrig / Address.Module.txt
Created May 6, 2025 16:40
GMH Data Model Excel Workbook Modules
/*
* Extract the Street from an Address
*/
AddressStreet = LAMBDA(address, LEFT(address,FIND(",",address)-1));
/*
* Extract the City from an Adderss
*/
AddressCity = LAMBDA(address, TRIM(MID(address,FIND(",",address)+1,FIND(",",address,FIND(",",address)+1)-FIND(",",address)-1)));