Skip to content

Instantly share code, notes, and snippets.

@jimbrig
jimbrig / gmhcommunities.brandfetch.response.json
Created December 19, 2024 23:01
GMH Communities Brand Fetch Response
{
"id": "id1vzz_tJL",
"name": "GMH Communities",
"domain": "gmhcommunities.com",
"claimed": false,
"description": "We are GMH communities, a privately owned, real estate company specializing in the acquisiton, development, and management of exceptional living communities.",
"longDescription": "GMH Communities is a privately owned real estate company that specializes in acquiring, developing, and managing exceptional living communities across the United States. With over 35 years of experience, GMH Communities, owned by GMH Associates™, has established itself as a leader and innovator in the industry since 1985. Their comprehensive services cover every aspect of the development process, from preliminary concepts to delivery. The dedicated GMH team handles site selection and acquisition, due diligence, entitlements, design coordination, and construction, ensuring a seamless and efficient experience for their clients. GMH Communities has received numerous accolades for their work, includi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / openapi.yml
Created November 7, 2024 23:35
NoClocksAuth OpenAPI
openapi: 3.1.0
info:
title: No Clocks Auth API
version: 1.0.0
description: >-
This API allows for user authentication, management of users, roles, permissions, and session handling.
termsOfService: https://noclocks.dev/terms
contact:
name: API Support
url: https://support.noclocks.dev
@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",
@jimbrig
jimbrig / openapi.json
Last active November 7, 2024 23:04
Brandfetch OpenAPI
{
"openapi": "3.1.0",
"info": {
"title": "BrandFetch API",
"description": "API for retrieving brand information using domain or ID.",
"version": "1.0.0",
"termsOfService": "https://brandfetch.com/terms",
"license": {
"name": "MIT",
"url": "https://choosealicense.com/licenses/mit/"
@jimbrig
jimbrig / openapi.yml
Last active October 31, 2024 03:31
Brandfetch API Spec
openapi: 3.1.0
info:
title: Brandfetch API
description: Brandfetch API for retrieving brand information.
version: 2.0.0
termsOfService: https://brandfetch.com/terms
contact:
url: https://brandfetch.com/developers
servers:
- url: https://api.brandfetch.io/v2
@jimbrig
jimbrig / openrouter.R
Last active October 21, 2024 22:34
openrouter.R
library(httr2)
call_openrouter <- function(prompt, model = "openai/gpt-3.5-turbo") {
req <- request("https://openrouter.ai/api/v1/chat/completions") %>%
req_headers(
"Content-Type" = "application/json",
"Authorization" = paste("Bearer", Sys.getenv("OPENROUTER_API_KEY")),
"HTTP-Referer" = "https://your-site-url.com", # Optional
"X-Title" = "Your Site Name" # Optional
) %>%