Skip to content

Instantly share code, notes, and snippets.

View Ryu1845's full-sized avatar
🎯
Focusing

Sofian Mejjoute Ryu1845

🎯
Focusing
View GitHub Profile
@Ryu1845
Ryu1845 / template.ass
Created January 8, 2023 14:08
vtuber clip template subtitle file (modified from https://github.com/idolactivities/hololive-translations/)
[Script Info]
; Script generated by Aegisub 9010-makepkg-6f546951b
; http://www.aegisub.org/
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709
PlayResX: 1280
PlayResY: 720
<!DOCTYPE html>
<html>
<head>
<title>SNScrape Viewer</title>
<script src="https://unpkg.com/mustache@latest"></script>
<script src="https://cdn.tailwindcss.com"></script>
<script>
function checkVisible(elm, threshold, mode) {
threshold = threshold || 0;
gen-username() {
vowel() {
head /dev/urandom | tr -dc 'aeiueoy' | cut -c1
}
consonant() {
head /dev/urandom | tr -dc 'qwrtpsdfghjklzxcvbnm' | cut -c1
}
digit() {
head /dev/urandom | tr -dc '[:digit:]' | cut -c1
}
@Ryu1845
Ryu1845 / Made in Abyss - 01.json
Last active July 4, 2022 20:26
made in abyss cytube
{
"title": "Made in Abyss - 01",
"duration": 10,
"live": false,
"sources": [
{
"url": "https://cloud1.userscloud.com/d/giluki2xtn2fvxijjto4veyddzoaqowmz6atpvgsxyzkfbknhkvlwc2656llywni2ft46kwd/video.mp4",
"contentType": "video/mp4",
"quality": 1080,
"bitrate": 9000
WEBVTT
00:03.560 --> 00:05.110
<b>Come on, Nat!</b>
00:05.110 --> 00:06.900
<b>Why are you following me?</b>
00:06.900 --> 00:08.440
<b>Shut up!</b>
@Ryu1845
Ryu1845 / decoding.rs
Created May 16, 2022 20:24
Decode audio file to wav f32 in rust using ac ffmpeg and hound
use ac_ffmpeg::{
codec::{
audio::{AudioDecoder, AudioResampler, SampleFormat},
Decoder,
},
format::{
demuxer::{Demuxer, DemuxerWithStreamInfo},
io::IO,
},
Error,
@Ryu1845
Ryu1845 / clip.sh
Created November 21, 2021 20:14
Download only part of a youtube video
#!/bin/bash
clip() {
YOUTUBE_URL="${1}"
START_TIME="${2}"
END_TIME="${3}"
END_FILENAME="${4}"
AUDIO_URL="$(yt-dlp "${YOUTUBE_URL}" -g -f bestaudio)"
VIDEO_URL="$(yt-dlp "${YOUTUBE_URL}" -g -f bestvideo)"
ffmpeg \
@Ryu1845
Ryu1845 / wine_dracula.reg
Created July 30, 2021 15:12
Dracula colorscheme for wine
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Colors]
"ActiveBorder"="40 42 54"
"ActiveTitle"="98 114 164"
"AppWorkSpace"="40 42 54"
"Background"="23 23 28"
"ButtonAlternateFace"="68 71 90"
"ButtonDkShadow"="248 249 249"
"ButtonFace"="40 42 54"