Skip to content

Instantly share code, notes, and snippets.

View curioustorvald's full-sized avatar

CuriousTorvald curioustorvald

View GitHub Profile
@curioustorvald
curioustorvald / crt_shader_with_composite_sim.frag
Last active November 25, 2025 15:41
Flat screen CRT shader with composite signal simulation for authenticity
#version 330 core
/*
Copyright 2025 CuriousTorvald
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
// ============================================================================
// CRT + NTSC Composite/S-Video Signal Simulation Shader (Enhanced Version)
// ============================================================================
@curioustorvald
curioustorvald / srgb_to_xyb.c
Last active August 26, 2025 11:51
sRGB to XYB conversion
// XYB Color Space Conversion Functions
// Based on JPEG XL XYB specification with proper sRGB linearization
// test with:
//// gcc -DXYB_TEST_MAIN -o test_xyb xyb_conversion.c -lm && ./test_xyb
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
@curioustorvald
curioustorvald / tsvm_crt_shader.frag
Last active August 14, 2024 16:28
CRT Shader for TSVM emulator
/*
Copyright 2024 CuriousTorvald
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef GL_ES
precision mediump float;
#!/usr/bin/env python3
# This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch.
# You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html
# original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/
# 24/7/365 NAS adaptation by CuriousTorvald (https://gist.github.com/curioustorvald/f7d1eefe1310efb8d41bee2f48a8e681)
# Twitch Helix API integration by Krepe.Z (https://gist.github.com/krepe90/22a0a6159b024ccf8f67ee034f94c1cc)
# Chzzk adaptation by CuriousTorvald (https://gist.github.com/curioustorvald/240e67a53f8131d7166ad5269044c719)
# Copyright (c) 2017, 2019, 2020, 2022, 2024 Junian, CuriousTorvald and Krepe.Z
@curioustorvald
curioustorvald / korean_ime_for_opensuse.md
Last active November 9, 2022 09:28
openSUSE Tumbleweed/Leap을 위한 두벌식 및 세벌식 한글 입력 설정

openSUSE Tumbleweed/Leap을 위한 두벌식 및 세벌식 한글 입력 설정

  1. openSUSE를 영어로 설치, 레이아웃은 일단은 무조건 Qwerty
  2. 빌드에 필요한 패키지들을 설치
    sudo zypper in cmake gtk2-devel gtk3-devel gtk4-devel fcitx fcitx-devel libqt5-qtbase-devel pkg-config libtool intltool
    
  3. 코드를 가져오기. (새로 설치한 시스템에는 git이 없기 때문에 sudo zypper in git git-lfs를 먼저 실행해주자)

git clone https://gitlab.com/3beol/libhangul.git

# usage: python3 cull.py HUE
# where HUE is a number
#
# Get datasets faster using multiple threads, like:
# seq 360 | xargs --max-procs=8 -n 1 python cull.py
# Copyright © 2022 CuriousTorvald
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
python 녹화스크립트.py -u 스트리머_아이디
rem 녹화스크립트.py에는 녹화스크립트 파일의 완전한 경로(C:\Users로 시작하는 거)를 입력해주세요
rem 스트리머_아이디에는 녹화하고자 하는 스트리머의 트위치 아이디를 입력해주세요
rem 밑에 있는 줄은 오류가 생겼을 때 창이 꺼지지 않게 하기 위한 것으로 지우지 말아주세요!
pause >nul
@curioustorvald
curioustorvald / oesolise.js
Created August 18, 2022 03:07
Oesolise — 최현배식 푸러쓰기를 유니코드로 어떻게든 풀어 쓰기
function oesolise(string) {
const choseong = ['ᴊ','ᴊᴊ','ʟ','c','cc','ƨ','ᴅ','ᵾ','ᵾᵾ','ʌ','ʌʌ','','ʌ̅','ʌ̅ʌ̅','ƛ','ᴊ̵','ᴇ','z̵','ô']
const jungseong = ['h','hı','k','kı','q','qı','εլ','εլı','⊥','⊥̌h','⊥̌hı','⊥̌ı','⫫','ᴛ','ᴛq','ᴛqı','ᴛı','⫪','ᴜ','ᴜı','I']
const jongseong = ['','ᴊ','ᴊᴊ','ᴊʌ','ʟ','ʟʌ̅','ʟô','c','ƨ','ƨᴊ','ƨᴅ','ƨᵾ','ƨʌ','ƨᴇ','ƨz̵','ƨô','ᴅ','ᵾ','ᵾʌ','ʌ','ʌʌ','o','ʌ̅','ƛ','ᴊ̵','ᴇ','z̵','ô']
let outbuf = ''
const chars = [...string]
chars.map(it => it.codePointAt(0)).forEach(cp => {
@curioustorvald
curioustorvald / twitch-tts-read.sh
Last active July 12, 2021 00:21
Twitch Chat Reader with Espeak and Chatty
#!/bin/bash
file=speechtemp.txt
filetmp=speechtemp.tmp
while :
do
lastline=$(head -1 $file)
tail -n +2 $file > $filetmp && mv $filetmp $file
outline=$(echo $lastline | sed -r 's/\[[^\n]+\] <[^\n<>]+>\*?//')
@curioustorvald
curioustorvald / jawtfontaa.md
Created September 23, 2020 01:35
Force Enable AA on Java Swing App

java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=lcd -jar ****.jar