Skip to content

Instantly share code, notes, and snippets.

View Cyberes's full-sized avatar
💭
💀 Deceased (as of Jan, 2022)

Cyberes

💭
💀 Deceased (as of Jan, 2022)
View GitHub Profile
@Cyberes
Cyberes / goes16-rtlsdr.md
Created January 1, 2021 02:53 — forked from lxe/goes16-rtlsdr.md
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch

How to Install Nvidia Drivers on Proxmox

  1. Your /etc/apt/sources.list should look like something like this:
deb http://ftp.us.debian.org/debian [bullseye, bookworm, etc] main contrib non-free

deb http://ftp.us.debian.org/debian [bullseye, bookworm, etc]-updates main contrib non-free

# security updates
deb http://security.debian.org [bullseye, bookworm, etc]-security main contrib
# A simple script to create a slideshow from images in a directory. Put all your images in `input/`
# Delete the old images.txt
rm images.txt
# I used this to convert all my png files to images
# mkdir old
# for f in input/*.png; do
# echo "$f"
# mogrify -format jpg "$f"
@Cyberes
Cyberes / mega_audio.sh
Last active December 15, 2022 10:08
Random Video Montage
# I wrote this to combine a bunch of audio files for the random video script above
# I didn't use this because ffmpeg messed up some of my .ogg files.
rm audio.txt
for f in $PWD/audio/*.ogg; do
printf '%s\n' "file '$f'" >> audio.txt
done
shuf audio.txt > temp
mv temp audio.txt
ffmpeg -f concat -safe 0 -i audio.txt -vn -ar 44100 -b:a 112k -acodec libmp3lame long.mp3
@Cyberes
Cyberes / How to re-implement remove-background in ocrmypdf.md
Last active February 3, 2023 22:58
Re-implement --remove-background in OCRmyPDF

I needed --remove-background so I re-implemented this feature myself.

https://github.com/ocrmypdf/OCRmyPDF

Build Dependencies

Leptonica

This feature requires Leptonica, an image processing and analysis library. You have to build it from source, which is why it was removed from OCRmyPDF.

@Cyberes
Cyberes / default.conf
Last active February 14, 2023 23:01
Fix Matrix Synapse not allowing video seeking (nginx)
# Fix video buffering
# https://github.com/matrix-org/synapse/issues/4780#issuecomment-1003101558
# luarocks install pgmoon
set $our_homeserver "matrix.example.com"; # Set this to the hostname of your server
set $media_store "/var/lib/matrix-synapse/media"; # no trailing slash
set $media_status_header true; # add a header to show the status of the media.
location ~* "^/_matrix/media/r0/download/(.*?)/([A-Za-z0-9]{2})([A-Za-z0-9]{2})(.*)$" {
# Enable video seeking.
@Cyberes
Cyberes / Tunneling Proxy for Paperspace.md
Last active August 18, 2024 13:27
Tunneling Proxy for Paperspace

Tunneling Proxy for Paperspace

Gradio's reverse proxy service sucks. The WebUI program integrates ngrok to fix this issue which works well but Paperspace locks your account for using any tunneling proxy service such as (who knows how many they explicitly ban).

There is literally no easy solution for this and you must to host your own server that Paperspace doesn't know about. What I do is run a rathole server on a $4 DigitalOcean VPS.

@Cyberes
Cyberes / sillytavern-chat-to-txt.py
Last active June 22, 2023 03:04
Convert SillyTavern jsonl chats to TXT files
#!/usr/bin/env python3
import argparse
import re
from pathlib import Path
import sys
import json
"""
Convert SillyTavern jsonl chats to TXT files.
@Cyberes
Cyberes / sillytavern-chat-to-txt-gpt4.py
Last active May 26, 2023 07:06
Convert SillyTavern jsonl chats to TXT files using AI.
#!/usr/bin/env python3
import argparse
import re
from pathlib import Path
import sys
import json
import openai
import tiktoken
import threading
import traceback