Skip to content

Instantly share code, notes, and snippets.

View kernkraft235's full-sized avatar

kernkraft kernkraft235

View GitHub Profile
@kernkraft235
kernkraft235 / fish_cheatsheet.md
Created February 28, 2026 13:53
Fish Shell Cheatsheat

fish shell cheatsheet (focused)


quoting

  • single quotes: no expansion at all
echo '$HOME *.txt'
@kernkraft235
kernkraft235 / fix-safetensors-header.py
Last active March 6, 2026 12:31
Fixes the issue with malformed metadata and incorrect key names. This was made to make certain Flux2-Klein models importable into Draw Things.app, but it should also address the issue with LoRAs not fusing anything in Draw Things and MFLUX. It takes a single argument: the input file, and outputs a new file with `-FIXED` appended to the filename …
#!/usr/bin/env python3
"""
- Fixes the issue with malformed metadata and incorrect key names.
This was made to make certain models importable into Draw Things.app,
but it should also address the issue with LoRAs not fusing anything in Draw Things and MFLUX.
It takes a single argument: the input file (.safetensors)
and outputs a new file with `-FIXED` appended to the basename (not file extension)
This shouldnt require any package installs, and does it's magic without loading the full bulk of the file into RAM.
@kernkraft235
kernkraft235 / safariAntiZoom.js
Created December 8, 2025 08:15
Userscript: Anti-Keyboard-Zoom for Safari iOS
// ==UserScript==
// @name Dynamic Anti-AutoZoom
// @namespace vet.skynet.userscripts
// @author userscripts@skynet.vet
// @match *://*/*
// @run-at document-start
// ==/UserScript==
(function () {
function updateRule() {
@kernkraft235
kernkraft235 / script.js
Created November 23, 2025 15:50
TypingMind - Custom Model Reasoning Continuity Extension
(() => {
console.log("Reasoning Continuity Extension initializing…");
/**************************************************************
* 1. USER CONFIGURATION (add custom model endpoints)
**************************************************************/
const ENDPOINTS_WITH_REASONING = [
"https://openrouter.ai/api/v1/chat/completions"
];
@kernkraft235
kernkraft235 / curl2shortcut.py
Created November 19, 2025 10:14
Python Script to convert a complete curl command to a Apple Shortcut Action then place it on clipboard
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
curl2shortcut.py
A script that converts curl commands into Apple Shortcuts "Get Contents of URL" actions.
Reads a curl command (from argument or stdin), parses it to extract the HTTP method,
URL, headers, and JSON data, then builds a properly formatted Shortcuts action and
copies it to the clipboard with the correct UTI so it can be pasted directly into
@kernkraft235
kernkraft235 / BaselineTest.txt
Created October 2, 2025 15:16 — forked from JuneKelly/BaselineTest.txt
Full text of the Baseline Test from Blade Runner 2049
A blood black nothingness began to spin.
Began to spin.
Let's move on to system.
System.
Feel that in your body.
@kernkraft235
kernkraft235 / logit_bias_eval.py
Last active July 28, 2025 14:41
logit_bias all dashes set to -100, compared to normal response
#!/usr/bin/env python3
import sys
import asyncio
import openai
import os
import subprocess
import json
import pathlib
import unicodedata as u
/*
By kenharris from TypingMind Discord.
TypingMind Extension: Model Search & Full Model Names
Model Search Functionality: The model selector now includes a search
bar at the top. You can easily search and filter models by typing in
their names
@kernkraft235
kernkraft235 / Install WSL2.md
Created November 1, 2024 14:40
Install WSL2.md

Official Documentation

Mega easy way that should work:

  1. Install Ubuntu from the Microsoft Store
  2. Once it's done installing open the Ubuntu app

A terminal window should pop up that has the following contents:

Installing, this may take a few minutes...

Acessing your Windows Files from within WSL

You can access you Windows folders at /mnt/c/Users/$WIN_USER I have set the environment variable to always equal your actual Windows username

For convenience I made symbolic links in your Linux home directory to your Windows home dir and your Downloads folder Use the command 'ls' to see whats in your home directory

Python

I have initialized a virtualenv that automatically starts when you load your shell This is useful so that you can install pip packages psuedo-globally without interferring with the system Python install