Skip to content

Instantly share code, notes, and snippets.

@CL-Jeremy
CL-Jeremy / _font_i18n.less
Created February 15, 2021 00:55
Extendable native font stack for cross-platform support, (here) for CJK language support for Gitea
/* font i18n */
@font-face {
font-family: system-emoji;
src: local("Apple Color Emoji"), local("Segoe UI Emoji"), local("Noto Color Emoji"), local("Twemoji Mozilla");
unicode-range: ~"U+2310-329F, U+FE0?, U+1F000-1FAFF";
}
[lang] {
font-family: var(--fonts-regular);
}
:root {
@CL-Jeremy
CL-Jeremy / wsl-bash-shim.sh
Created January 20, 2021 19:04
Shim for chainloading external SSH server (at port 2222) from genie bottle; add to /etc/shells for this to be accepted by sshd
#!/bin/sh
if [ $# -eq 0 ]; then
CMD="-t bash"
else
[ "$1" = "-c" ] && shift && CMD="bash -c $(printf %q "$@")"
fi
ssh -q -p 2222 windows.local $CMD
@CL-Jeremy
CL-Jeremy / bilinicomment.user.js
Last active September 15, 2020 20:40
Load external ass subtitle hosted with WsgiDAV 3.0.x for Bilibili's HTML5 player
// ==UserScript==
// @name Load external ass subtitle for Bilibili
// @version 0.2.2.3
// @include /:\/\/www\.bilibili\.com\/video\/(BV|[ab]v).*/
// @require https://code.jquery.com/jquery-1.12.4.min.js
// @require https://cdn.jsdelivr.net/gh/CL-Jeremy/ASS@next/dist/ass.min.js
// @require https://cdn.jsdelivr.net/npm/css-element-queries/src/ResizeSensor.js
// @grant GM_addStyle
// ==/UserScript==
@CL-Jeremy
CL-Jeremy / flowplayer-danmaku.md
Last active September 9, 2020 21:42
Single-file flowplayer-based danmaku player for use with WsgiDAV 3.0.x

Single file comment overlay ("danmaku") player

Could be used as a subtitle player, but is mainly used for danmaku display. It loads subtitle files starting with the same name as the video file and ending with _comments.ass.

The font choice tries to resemble that of the actual Niconico player on macOS and thus could not be distributed freely. It is however possible, at least for the ASS.js version, to source local fonts installed on the viewer's host OS.

@CL-Jeremy
CL-Jeremy / test_filter_fps.rs
Created August 2, 2020 14:18
Test example for applying FPS filter and encoding GIF with rust-ffmpeg
extern crate ffmpeg;
use ffmpeg::*;
const INPUT: &str = "input.gif";
const OUTPUT: &str = "output.gif";
const FPS: f64 = 25.0;
fn main() {
init().map_err(|e| format!("Unable to initialize ffmpeg: {}", e)).unwrap();
let mut input_context = format::input(&INPUT)
@CL-Jeremy
CL-Jeremy / # mesa - 2019-06-18_10-26-36.txt
Created June 18, 2019 08:36
mesa (linuxbrew/xorg/mesa) on Debian GNU/Linux 9.6 (stretch) - Homebrew build logs
Homebrew build logs for linuxbrew/xorg/mesa on Debian GNU/Linux 9.6 (stretch)
Build date: 2019-06-18 10:26:36
@CL-Jeremy
CL-Jeremy / # mesa - 2019-06-18_08-02-25.txt
Created June 18, 2019 06:02
mesa (linuxbrew/xorg/mesa) on Debian GNU/Linux 9.6 (stretch) - Homebrew build logs
Homebrew build logs for linuxbrew/xorg/mesa on Debian GNU/Linux 9.6 (stretch)
Build date: 2019-06-18 08:02:25
@CL-Jeremy
CL-Jeremy / # mesa - 2019-06-17_21-18-03.txt
Created June 18, 2019 05:37
mesa (linuxbrew/xorg/mesa) on Debian GNU/Linux 9.6 (stretch) - Homebrew build logs
Homebrew build logs for linuxbrew/xorg/mesa on Debian GNU/Linux 9.6 (stretch)
Build date: 2019-06-17 21:18:03
@CL-Jeremy
CL-Jeremy / # vtk - 2019-06-15_17-00-51.txt
Created June 15, 2019 15:19
vtk on Debian GNU/Linux 9.6 (stretch) - Homebrew build logs
Homebrew build logs for vtk on Debian GNU/Linux 9.6 (stretch)
Build date: 2019-06-15 17:00:51