Skip to content

Instantly share code, notes, and snippets.

View curioustorvald's full-sized avatar

CuriousTorvald curioustorvald

View GitHub Profile
#!/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

간결하고 부정확한 프로그래밍 언어의 역사

원문에서 번역 및 (잼을 추가하기 위해)첨삭.

1800

조제프 마리 자카르 Joseph Marie Jacquard는 오바로크 기계에(원문은 방직기계) 천공카드를 먹여 최초의 초-다중쓰레드 처리장치를 개발했다 (역주: thread에는 바느질 실이라는 뜻이 있다). 이 발명품은 로봇이 일감을 빼앗을 것을 우려하는 당시의 노동자에게 거대한 반대를 받았다.

@curioustorvald
curioustorvald / my-little-streamer-bot.md
Last active February 27, 2024 15:00
How to record twitch live streaming PROPERLY

송출이 불안정한 스트리머의 방송을 최소한의 딜레이로 녹화하도록 만들어진 녹화 스크립트입니다. 호스팅 채널을 녹화하지 않고, TS파일을 직접 저장합니다.

이 스크립트는 24/7 상시감시 및 녹화를 위해 준비된 스크립트이고 설정 과정에서 약간의 프로그래밍적 지식이 필요합니다. 단타성 녹화를 원한다면 더 단순한 거 찾아다 쓰십쇼.

치지직용 스크립트를 테스트하고 있습니다. 여러분의 많은 기여가 필요합니다 🙏🙏

세팅하기 전에

윈도에서도 작동은 하겠지만, 진짜 봇을 구축하려면 이 글의 작성자는 리눅스를 사용하는 걸 추천합니다. 리눅스를 쓰는 이유는, 적어도 얘는 업데이트 있다고 지멋대로 재부팅하지는 않으니까요 (대충 트위치 카파 콘)

#!/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)
# Copyright (c) 2017, 2019, 2020, 2022 Junian, CuriousTorvald and Krepe.Z
#