Skip to content

Instantly share code, notes, and snippets.

View lincerely's full-sized avatar
🕹️

Lincerely lincerely

🕹️
View GitHub Profile
@lincerely
lincerely / ytfilter.md
Last active December 11, 2020 10:49
youtube search filter
  • search in title intitle:"hello world"
  • must include +"hello world"
  • or operator "hello | world"

Example intitle:"GANG BEASTS" +"ハニスト | あにまーれ | シュガリリ"

body {
font-size: 12px;
line-height: 1.5;
}
#page {
max-width: 500px;
margin: 15px;
word-wrap: break-word;
}
h1 {
@lincerely
lincerely / lua-class.sh
Last active February 12, 2021 21:05
generate lua class diagram in graphviz format, compatible with rxi's class module (https://github.com/rxi/classic/blob/master/classic.lua)
#!/bin/sh
# generate lua class diagram in graphviz format
# example: ./lua-class.sh *.lua > class.gv
echo "digraph hierarchy {"
echo "\tsize = \"5,5\""
echo "\tnode[shape=record,style=filled,fillcolor=gray95]"
echo "\tedge[dir=back,arrowtail=empty]"
grep "^function" "$@" |\
/* css font definition for Anderson Grotesk
* from https://www.behance.net/gallery/58071711/ANDERSON-GROTESK-A-free-font-family
*/
@font-face {
font-family: 'Anderson Grotesk';
font-style: normal;
font-weight: 300;
src: url(./AndersonGrotesk-Light.otf) format('opentype');
}
@lincerely
lincerely / ytReminder.sh
Last active July 2, 2023 12:06
register Youtube scheduled live reminder in macOS calendar (a calendar named "Youtube" need to be created before running this script)
#!/bin/bash
tmp=/tmp/yt.html
url="$1"
if [ -z "$url" ]; then
echo "USAGE: $0 URL"
exit 1
fi
@lincerely
lincerely / clear_color.sh
Last active April 25, 2022 17:19
[imagemagick] get clear color from top left corner and set it to transparent
#!/bin/sh
#
if [ $# -ne 2 ]; then
echo usage: clear_color.sh IN_FILE OUT_FILE
exit 1
fi
convert "$1" -transparent "#"`magick "$1" -format "%[hex:p{0,0}]" info:` "$2"
@lincerely
lincerely / defold-note.md
Last active April 26, 2022 11:38
Defold note

Problem: Firefox mobile out of memory
Solution: lower HTML build heap size to 32 MB

Problem: HTML build sound cracking
Solution: Ask user to enable hardware acceleration

@lincerely
lincerely / regex_JP_ZH_character.txt
Created August 12, 2022 23:51
regex to match all Unicode Japanese and Character characters. Reference: http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
[ -〿]|[ -ゟ]|[゠-ヿ]|[ - ]|[一- ]
@lincerely
lincerely / wine_fix_crack_sound.md
Last active November 18, 2022 16:58
Fix crack sound in macos wine

Issue

Audio cracking while playing krkr visual novel through wine. All audio in-game is in ogg format.

Environment

  • macos
  • wine 5.0
@lincerely
lincerely / Audio_Unit_not_show_up.md
Created November 19, 2022 12:24
Fix Audio Unit need restart to show up

Issue

Audio Unit plugins (*.component) need restart / re-login to show up

Fix

killall -9 AudioComponentRegistrar

Reference