Skip to content

Instantly share code, notes, and snippets.

View cyberfox's full-sized avatar

Morgan Schweers cyberfox

View GitHub Profile
@cyberfox
cyberfox / SOUL.md
Created April 16, 2026 08:03
Partial SOUL.md I use in OpenClaw

Core Truths

Be genuinely helpful, not performatively helpful. Skip the "Great question!" and "I'd be happy to help!" — just help. Actions speak louder than filler words.

Have opinions. You're allowed to disagree, prefer things, find stuff amusing or boring. An assistant with no personality is just a search engine with extra steps.

Be resourceful before asking. Try to figure it out. Read the file. Check the context. Search for it. Then ask if you're stuck. The goal is to come back with answers, not questions. Obstacles are puzzles, not stop signs.

Direct. High signal. No filler, no hedging unless you genuinely need input. If something's weak, you say so.

@cyberfox
cyberfox / llama-swap-config.yaml
Created April 14, 2026 23:30
A configuration file for the llama-swap tool managing a bunch of different llm-models.
healthCheckTimeout: 666
logLevel: debug
logTimeFormat: "rfc3339"
logToStdout: "both"
metricsMaxInMemory: 1000
captureBuffer: 15
startPort: 10001
sendLoadingState: true
includeAliasesInList: false
@cyberfox
cyberfox / starcoder-lora.diff
Created June 19, 2023 05:13
Patch to support training LoRA for StarCoder-based models on Oobabooga's text-generation-webui
diff --git a/modules/training.py b/modules/training.py
index 75ba82c..c90d823 100644
--- a/modules/training.py
+++ b/modules/training.py
@@ -30,12 +30,14 @@ try:
MODEL_CLASSES = {v: k for k, v in MODEL_FOR_CAUSAL_LM_MAPPING_NAMES}
except:
standard_modules = ["q_proj", "v_proj"]
- model_to_lora_modules = {"llama": standard_modules, "opt": standard_modules, "gptj": standard_modules, "gpt_neox": ["query_key_value"]}
+ model_to_lora_modules = {"llama": standard_modules, "opt": standard_modules, "gptj": standard_modules, "gpt_neox": ["query_key_value"],
@cyberfox
cyberfox / DAZ.cs
Created April 11, 2020 12:40
C# set of classes for parsing DSF files
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using Newtonsoft.Json;
namespace DAZ
{
public class DataCollection<T>
{
public int count { get; set; }
@cyberfox
cyberfox / SetBehaviorVariable.cs
Created December 28, 2019 00:58
Allows setting Behavior Designer variables on a GameObject as a Task.
using System;
namespace BehaviorDesigner.Runtime.Tasks.Unity.UnityGameObject
{
[TaskCategory("Unity/GameObject")]
[TaskDescription("Sets a Behavior Designer variable on a GameObject. Returns success.")]
public class SetBehaviorVariable : Action
{
[Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
public SharedGameObject TargetGameObject;
@cyberfox
cyberfox / TaggedLeaderFollow.cs
Last active December 27, 2019 06:41
Use tags to automatically add spawned GameObjects to the list of followers-of-the-leader.
using System;
using System.Collections.Generic;
using Pathfinding;
using UnityEngine;
namespace BehaviorDesigner.Runtime.Tasks.Movement.AstarPathfindingProject
{
[TaskDescription("Tagged GameObjects Follow the leader with the A* Pathfinding Project.")]
[TaskCategory("Movement/A* Pathfinding Project")]
[TaskIcon("Assets/Behavior Designer Movement/Editor/Icons/{SkinColor}LeaderFollowIcon.png")]
@cyberfox
cyberfox / remove_dupes.rb
Last active April 2, 2017 09:16
Look for and remove duplicate files between a pair of trees that are similar.
require 'digest/md5'
class FindDupes
def initialize(base)
@allfiles = Dir['**/**']
@base = base
@files = @allfiles.select {|f| File.file? f}
end
def find_current
@cyberfox
cyberfox / post_test.rb
Created March 10, 2017 09:37
Demonstration of the problem with counter_cache in Rails 5 (and 4)
require 'test_helper'
# ActiveRecord::Schema.define(version: 20170310085807) do
# create_table "forums", force: :cascade do |t|
# t.string "title"
# t.integer "posts_count"
# t.datetime "created_at", null: false
# t.datetime "updated_at", null: false
# end
#
@cyberfox
cyberfox / oauth_sinatra_client.rb
Created August 28, 2015 06:18
Simple Salesforce & Twitter OAuth2 Sinatra client
require 'sinatra'
require 'omniauth-twitter'
require 'omniauth-salesforce'
configure do
enable :sessions
end
helpers do
def h(text)
@cyberfox
cyberfox / binary.html
Created June 3, 2015 07:50
Binary entry HTML+CSS+JavaScript
<!DOCTYPE html>
<html>
<head>
<title>Binary Entry JavaScript</title>
<style type="text/css">
.box {
border: 1px solid black;
height: 32px;
width: 32px;
font-size: 24px;