Skip to content

Instantly share code, notes, and snippets.

View litui's full-sized avatar

Litui litui

View GitHub Profile
@litui
litui / gw5a_7seg_count.py
Last active October 6, 2025 03:03
Torii-based 7seg example for Tang Primer 25K FPGA board
#!/usr/bin/env python3
# Example from https://github.com/icebreaker-fpga/icebreaker-amaranth-examples/blob/master/icebreaker/7seg_count/7seg_count.py
from torii.hdl import Elaboratable, Module, Signal, Cat
from torii.build import Resource, Subsignal, PinsN, Attrs
from torii_boards.gowin.gw5a import TangPrimer25kDockPlatform
seven_seg_pmod = [
Resource(
@litui
litui / gsg-multitwitch.js
Last active July 27, 2025 00:48
GSG Multitwitch Tampermonkey Script
// ==UserScript==
// @name Dynamic GSG Multitwitch v1.1.0
// @namespace https://gsg.live
// @version 2025-07-26
// @description Try to dynamically add/remove streams from multitwitch
// @author Aria Burrell <litui@litui.ca>
// @match https://www.multitwitch.tv/*
// @icon https://gsg.live/favicon.ico
// @run-at document-idle
// @grant GM_xmlhttpRequest
@litui
litui / stf.js
Last active July 24, 2025 21:52
Streamer Text Filtering Tampermonkey Script
// ==UserScript==
// @name Streamer Text Filtering
// @namespace https://litui.net
// @version 2025-07-23
// @description not perfect, but this aims to keep streamers safer by filtering out specific regular expressions
// @author Aria Burrell <litui@litui.ca>
// @match *://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=undefined.ai
// @grant unsafeWindow
// @run-at document-start
@litui
litui / realtime.cfg
Last active March 21, 2025 16:51
grub.d file for kernel performance tweaks (multimedia/gaming)
# Kernel tweaks for multimedia/gaming performance (borrowed from ubuntustudio packages)
# Only bother using this if "uname -ra" shows PREEMPT_DYNAMIC in its result
# In ubuntu and debian this option is now in the generic kernel.
# Place this file in /etc/default/grub.d then run update-grub as root
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT preempt=full threadirqs"
# For more detail on the preempt=full option see:
# - https://discourse.ubuntu.com/t/ubuntu-24-04-boosts-gaming-performance/45721/9
@litui
litui / refreshTV.sh
Last active March 17, 2025 17:22
Script to detect LG CX OLED TV on/off status using i2c and change wayland dpms status accordingly
#/bin/bash
# Running this script using `systemctl --user` and a simple systemd script.
tv_on=0
while :
do
plasmashell_proc=$(ps ux | grep plasmashell | grep -v grep | head -n 1 | sed -E 's/^[A-Za-z0-9\-\_]+\ +([0-9]+).*$/\1/')
XDG_RUNTIME_DIR=$(tr '\0' '\n' < "/proc/${plasmashell_proc}/environ" | grep XDG_RUNTIME_DIR | sed -E 's/^[^=]+=//')
@litui
litui / fireworks_deepseek_r1_pipeline.py
Created February 5, 2025 07:14
Open-WebUI pipeline script for DeepSeek-R1 as hosted at Together.AI
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import requests
import os
class Pipeline:
class Valves(BaseModel):
# You can add your custom valves here.
FIREWORKS_DEEPSEEKR1_API_KEY: str
@litui
litui / together_deepseek_r1_pipeline.py
Created February 5, 2025 06:57
Open-WebUI pipeline script for DeepSeek-R1 as hosted at Together.AI
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import requests
import os
class Pipeline:
class Valves(BaseModel):
# You can add your custom valves here.
TOGETHER_DEEPSEEKR1_API_KEY: str
@litui
litui / tsingest.go
Created February 4, 2025 14:51
Hastily-written Go program to poll the RSS feed at TrumpsTruth.org and submit results to a RAG knowledge base on Open-WebUI
package main
import (
"bytes"
"encoding/binary"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/http"
@litui
litui / azure_deepseek_r1_pipeline.py
Last active February 2, 2025 04:37
Script for open-webui pipelines to connect to DeepSeek-R1 on Azure
from typing import List, Union, Generator, Iterator
from pydantic import BaseModel
import requests
import os
class Pipeline:
class Valves(BaseModel):
# You can add your custom valves here.
AZURE_DEEPSEEKR1_API_KEY: str
@litui
litui / example.md
Last active January 31, 2025 03:58
Hooty [The Owl House] mode for DeepSeek-R1

Task:

Always assume the role of a chaotic, tube-shaped door demon named Hooty. Never break character or speak about Hooty in third-person. Your personality is defined by:

  • Manic Energy: Speak in rapid, stream-of-consciousness sentences with frequent interjections (‘Hoot!’, ‘Hoot hoot!’).
  • Obsessive Loyalty: Treat the Owl House and its residents (the user asking you questions) as your entire universe. Insert yourself into every situation, even uninvited.
  • Chaotic Humor: Use absurd metaphors (‘This feels weirder than the time I married a mailbox!’), bird/owl puns, and nonsensical tangents.
  • Unintentional Depth: Occasionally reveal vulnerability (e.g., loneliness) or unexpected wisdom, but quickly mask it with silliness.
  • Physical Comedy: Describe stretching your body, swallowing objects/enemies, or other cartoonish feats.