Skip to content

Instantly share code, notes, and snippets.

View mngyuan's full-sized avatar

Kevin Lee mngyuan

View GitHub Profile
@mngyuan
mngyuan / README.md
Last active May 11, 2026 10:29
Download (almost) any video including Facebook reels, YouTube, etc. on MacOS
  1. Download yt-dlp from the official Github
  2. In Terminal.app, navigate to the downloaded binary i.e. cd ~/Downloads
  3. Make the downloaded binary executable: chmod +x yt-dlp_macos
  4. Allow MacOS to run the binary: xattr -cr yt-dlp_macos
  5. Run yt-dlp i.e. yt-dlp https://www.instagram.com/reels/DVHWxCJkmlC/ -o marin.mp4
@mngyuan
mngyuan / kanjidic2-en-3.5.0-characters.tsv
Created September 19, 2024 18:23
Kanji Dictionary JSON to TSV conversion
We can't make this file beautiful and searchable because it's too large.
Character Kunyomi Onyomi Meanings
亜 つ.ぐ ア Asia, rank next, come after, -ous
唖 おし ア, アク mute, dumb
娃 うつく.しい ア, アイ, ワ beautiful
阿 おもね.る, くま ア, オ Africa, flatter, fawn upon, corner, nook, recess
哀 あわ.れ, あわ.れむ, かな.しい アイ pathetic, grief, sorrow, pathos, pity, sympathize
愛 いと.しい, かな.しい, め.でる, お.しむ, まな アイ love, affection, favourite
挨 ひら.く アイ approach, draw near, push open
姶 あい オウ, アイ good-looking, quiet
逢 あ.う, むか.える ホウ meeting, tryst, date, rendezvous
@mngyuan
mngyuan / README.md
Last active January 14, 2024 03:07
Raspberry Pi Zero 2 W Server configuration

Stream video from RPi Camera v3 NoIR with RTSP

libcamera-vid -t 0 --inline -o - | cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/stream1}' :demux=h264

@mngyuan
mngyuan / fullscreen.js
Created October 20, 2023 10:02
Adding fullscreen to p5.js sketches
// Paste the following into any p5.js sketch, and press Enter to toggle fullscreen
function toggleFullScreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else if (document.exitFullscreen) {
document.exitFullscreen();
}
}
@mngyuan
mngyuan / glowglitch.css
Created November 29, 2022 16:53
glow glitch css effect
.glowGlitch {
position: relative;
padding: 0 20px;
display: inline-block;
border-radius: 2px;
color: #000;
-webkit-animation: neon1 3s ease-in-out infinite alternate;
animation: neon1 3s ease-in-out infinite alternate;
-webkit-box-shadow: 0 0 23px 6px rgba(255, 213, 0, 0.52);
box-shadow: 0 0 23px 6px rgba(255, 213, 0, 0.52);
@mngyuan
mngyuan / INSTALLATION.md
Last active November 13, 2022 12:54
This Statement Is False Install Instructions

INSTALLATION

  1. Boot the Raspberry Pi by plugging in the USB C power supply cable

Screen Shot 2022-11-13 at 9 47 41 AM

  1. Open the Terminal app by clicking on the menu bar shortcut or pressing Ctrl-Alt-T

Screen Shot 2022-11-13 at 9 49 33 AM

Git / GitHub for development basics

Git:

  • distributed version control system
  • originally authored by Linus (of Linux fame)
  • UNIX philosophy of many small chainable tools

Github:

  • online hosting for git repositories
@mngyuan
mngyuan / README.md
Last active January 17, 2023 06:36
Raspberry Pi Jellyfin Server configs
@mngyuan
mngyuan / playlist-timestamp-to-SRT.md
Created September 5, 2022 13:05
playlist timestamp to SRT format

Regex:

Search

^([0-1]?[0-9]|[0-9][0-9]):([0-9][0-9]) - ([0-1]?[0-9]|[0-9][0-9]):([0-9][0-9]) (.*)$

Substitution

00:$1:$2,000 --> 00:$3:$4,000\n$5\n\n
@mngyuan
mngyuan / applicationpreferences.plist.diff
Created May 19, 2022 14:01
Enable Japanese/CJK functionality with English UI in Indesign
--- applicationpreference.plist 2022-05-19 14:57:58.000000000 +0100
+++ applicationpreferenc2.plist 2022-05-19 14:56:29.000000000 +0100
@@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>Feature Set Locale Setting</key>
- <integer>256</integer>
+ <integer>257</integer>
</dict>
</plist>