Skip to content

Instantly share code, notes, and snippets.

View trojblue's full-sized avatar

yada trojblue

  • Toronto
  • 20:00 (UTC -07:00)
View GitHub Profile
@trojblue
trojblue / switch-remote.md
Created February 3, 2025 14:50
Changing remote from one main repo to your fork

Changing remote from one main repo to your fork

check curr remote:

git remote -v
origin https://github.com/RVC-Boss/GPT-SoVITS (fetch)
@trojblue
trojblue / kokoro_tts_gpu.py
Created February 1, 2025 23:17
Local version of the huggingface Kokoro-TTS space (that uses local gpu instead of huggingface Zero)
"""
orig: https://huggingface.co/spaces/hexgrad/Kokoro-TTS
Deps:
pip install kokoro
other files: see original repo
"""
import os
import random
@trojblue
trojblue / remove_f12_blocking.js
Created January 25, 2025 15:06
Tampermonkey script that removes scripts that block developer tools access (f12 tools)
// ==UserScript==
// @name Remove F12 Blocking
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Removes scripts that block developer tools access
// @author YourName
// @match *://*/*
// @run-at document-start
// @grant none
// ==/UserScript==
@trojblue
trojblue / remove_pdf_sign.py
Last active January 25, 2025 13:07
Create an unsigned copy of the digitally signed pdf (which prevents copying, annotating, etc), using pypdf
"""
To use this script:
1. Install dependencies:
```bash
pip install pypdf
```
2. Run it with your input file path and desired output path.

Copypasta for desired agent behaviors

Targeted for wen_coder_32b, but works better on deepseek-v3

You are Qwen, created by Alibaba Cloud. You are a helpful assistant. 

Behaviors:
    - You never alter or exploit the intentions of any given task.
    - When instructions are unclear, you ask clarifying questions instead of making assumptions.
@trojblue
trojblue / wacom_widd_decode.md
Created January 20, 2025 03:14
Toy code to read wacom-exported widd files with python, for intuos pro fine-tip pens

code v1:

import json
import struct
import base64
import matplotlib.pyplot as plt
from collections import Counter

def read_widd_file(file_path):
@trojblue
trojblue / llm_lecturer_prompt.md
Last active January 15, 2025 20:52
Let ChatGPT-o1 explain subject matters and complex topics, in an engaging and easily digestible way.

Lecturer Prompt for LLMs

Let ChatGPT-o1 explain subject matters and complex topics, in an engaging and easily digestible way.

To use the prompt, you can either:

  1. Save this this in "Custom instructions" part of ChatGPT / Claude,

Or in a new chat:

  1. Copy the prompt in front, using prompt structure similar to this:
@trojblue
trojblue / argilla_custom-field_s3_access.md
Created October 10, 2024 12:37
Label S3 images with Argilla [WIP]
  1. edit dockerfile to allow host gateway access:
version: '3'
services:
  argilla:
    image: argilla/argilla-server:latest
    ports:
      - "6900:6900"  # Existing Argilla port
    extra_hosts: