Skip to content

Instantly share code, notes, and snippets.

View skeptrunedev's full-sized avatar
💭
🚢 🚢 🚢

skeptrune skeptrunedev

💭
🚢 🚢 🚢
View GitHub Profile
@skeptrunedev
skeptrunedev / Caddyfile
Created June 11, 2025 08:37
Caddy Cors Allow Anything Setup
# Global options
{
email [email protected]
debug
}
(cors) {
@cors_preflight method OPTIONS
handle @cors_preflight {
@skeptrunedev
skeptrunedev / film-grain-filter-with-svg.md
Created June 2, 2025 08:14
Film grain filter using svg's and HTML

You first need to add a svg filter definition to your HTML file such that the CSS can reference it later to put the grain on top of the background image. The filter uses feTurbulence to create a fractal noise pattern, and feColorMatrix to adjust the opacity. You can experiment with values like baseFrequency in feTurbulence or the alpha channel (the 0.8 in the feColorMatrix) to finetune the grain's intensity and texture.

<!-- SVG noise filter definition - this goes in your HTML -->
<svg style="display: none">
  <filter id="noiseFilter">
    <!-- Creates the fractal noise pattern -->
    <feTurbulence
      type="fractalNoise"
 baseFrequency="0.5"
@skeptrunedev
skeptrunedev / stitch-image-collection-into-gif.py
Created June 2, 2025 08:13
Stitch image collection into gif
from PIL import Image
import os
import glob
def create_rotating_gif(
folder_path, output_path="rotating_animation.gif", duration=500
):
"""
Create a GIF from images in a folder
@skeptrunedev
skeptrunedev / cleanup-git-worktrees.sh
Created June 1, 2025 00:15
remove all git worktrees which are not main
git worktree list | tail -n +2 | awk -F "[" '{print $2}' | awk -F "]" '{print $1}' | grep -v main | xargs -r -I{} git worktree remove --force {}
@skeptrunedev
skeptrunedev / shopify-appid-metafields.graphql
Created March 26, 2025 00:32
Shopify GraphQL to Get AppID and AppMetaFields
query GetAppId {
currentAppInstallation {
id
}
}
query GetAppMetafields($appId: ID!) {
appInstallation(id: $appId) {
id
metafields(first: 10, namespace: "trieve") {
@skeptrunedev
skeptrunedev / ingest-amplify-voice-to-trieve.ts
Created March 17, 2025 19:46
ingest-amplify-voice-to-trieve.ts
import { Window } from "happy-dom";
import { TrieveSDK, type ChunkReqPayload } from "trieve-ts-sdk";
const trieve = new TrieveSDK({
datasetId: process.env.TRIEVE_DATASET_ID,
apiKey: process.env.TRIEVE_API_KEY ?? "",
});
const fetchPageOfPosts = async ({ page }: { page: number }) => {
const htmlPageResp = await fetch(
@skeptrunedev
skeptrunedev / gemini-renovation-edit-prompt.json
Created March 16, 2025 11:01
gemini-renovation-edit-prompt.json
{
"contents": [
{
"parts": [
{
"fileData": {
"fileUri": "https://generativelanguage.googleapis.com/v1beta/files/f3vroya4ibp4",
"mimeType": "image/webp"
}
},
@skeptrunedev
skeptrunedev / true-classic-trieve-tampermonkey-script.js
Created March 1, 2025 09:01
true-classic-trieve-tampermonkey-script.js
// ==UserScript==
// @name True Classic
// @namespace http://tampermonkey.net/
// @version 2025-03-01
// @description try to take over the world!
// @author You
// @match https://www.trueclassictees.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=trueclassictees.com
// @grant none
// ==/UserScript==
@skeptrunedev
skeptrunedev / kill-long-pg-locks.sql
Created January 24, 2025 06:14
kill long running pg locks
WITH active_long_connections AS (
SELECT pid, now() - backend_start AS duration
FROM pg_stat_activity
WHERE state = 'active'
AND pid <> pg_backend_pid()
)
SELECT
pid,
duration,
pg_terminate_backend(pid) AS terminated
@skeptrunedev
skeptrunedev / original-trieve-mcp-issue.md
Created January 1, 2025 21:50
feat: add Trieve MCP server

Description

MCP Server for Trieve to support usage of Trieve in agentic workflows from Model Context Protocol clients. Ideally, this is built in a way where it's really exposing the set of tools/prompts/resources that could be consumed, with MCP as one possible shape.

Offering tools enables agents to intelligently consume Trieve's APIs.

I think an initial version of Trieve would look like:

  • MCP server with create-mcp-server (there are multiple starters) connecting to Claude over stdio json-rpc. SSE exists but can be added later and is only recommended if the mechanics are actually needed between the client and the server
  • Add config for Trieve's SDK lib