Skip to content

Instantly share code, notes, and snippets.

@jimbrig
jimbrig / registry-optimizer.md
Created April 15, 2025 16:02 — forked from ruvnet/registry-optimizer.md
Ai powered windows 11 registry optimization
@jimbrig
jimbrig / README.md
Created March 14, 2025 17:58 — forked from disler/README.md
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

@jimbrig
jimbrig / favicon_app.R
Created March 12, 2025 13:46 — forked from smach/favicon_app.R
R Shiny app to turn JPGs and PNGs into .ico favicon files. Written mostly by GPT o3-mini-high with help from Claude and Shiny Assistant (and me)
options(shiny.maxRequestSize = 5 * 1024^2) # Limit uploads to 5 MB
library(shiny)
library(magick)
library(base64enc)
library(bslib)
# Helper function to sanitize file names
safeFileName <- function(filename) {
gsub("[^a-zA-Z0-9_.-]", "_", filename)
@jimbrig
jimbrig / app_ollama.R
Created March 12, 2025 13:40 — forked from smach/app_ollama.R
Sample R Shiny app to run local models with an Ollama server. Coded mostly by various LLMs including Posit's Shiny Assistant
# This is a sample R Shiny app chatbot that runs local models with an Ollama server.
# You also need Ollama installed and a ollama server running, plus at least one local model pulled.
# I hard-coded a few local models,
# If you use this, you'll want to hard code yours (including descriptions, or take those out)
# Coded with lots of LLM help + Posit's Shiny Assistant.
library(shiny)
library(shinychat)
library(bslib)
@jimbrig
jimbrig / llm-diagram
Created March 11, 2025 17:19 — forked from david-diviny-nousgroup/llm-diagram
Generate a Mermaid.js diagram using LLM with elmer package to explain code
library(elmer)
library(tidyverse)
library(DiagrammeR)
library(glue)
code <- "starwars %>%
group_by(species) %>%
summarise(
n = n(),
mass = mean(mass, na.rm = TRUE)
@jimbrig
jimbrig / reactable_edit.R
Created February 11, 2025 15:01 — forked from DeepanshKhurana/reactable_edit.R
Editable Reactable (with Modals)
library(shiny)
library(reactable)
library(dplyr)
ui <- fluidPage(
actionButton(inputId = "edit",
label = "Edit"),
reactableOutput("table")
)
@jimbrig
jimbrig / shiny-reactive-R6-object.R
Created December 4, 2024 22:02 — forked from bborgesr/shiny-reactive-R6-object.R
Uses the reactiveTrigger() construct in an R6 object class in order to make it useful in reactive settings, like a Shiny app (MWE included)
library(shiny)
reactiveTrigger <- function() {
counter <- reactiveVal( 0)
list(
depend = function() {
counter()
invisible()
},
trigger = function() {
@jimbrig
jimbrig / README.md
Created November 25, 2024 15:45 — forked from disler/README.md
Four Level Framework for Prompt Engineering
@jimbrig
jimbrig / PasswordHashingExample.ps1
Created November 7, 2024 23:28 — forked from zola-25/PasswordHashingExample.ps1
PowerShell example showing outputs generated for a simple SHA-256 hash. No salting or other security mechanisms included.
$inputString = "Password123"
$sha256 = [System.Security.Cryptography.SHA256]::Create()
$bytes = [System.Text.Encoding]::UTF8.GetBytes($inputString)
$hashBytes = $sha256.ComputeHash($bytes)
$base64String = [System.Convert]::ToBase64String($hashBytes)
$binaryString = [System.Text.StringBuilder]::new()
foreach ($byte in $hashBytes) {
@jimbrig
jimbrig / plumber_asynchronous.R
Created November 4, 2024 19:19 — forked from zola-25/plumber_asynchronous.R
Asynchronous REST Operations in R Plumber with futures
# plumber_asynchronous.R
require(future)
require(uuid)
plan(multiprocess)
defaultPackages <- c("plyr",
"dplyr",
"dbplyr",