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 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>
@mngyuan
mngyuan / SD_Card_Sensors.ino
Created April 21, 2022 22:21
SD_Card_Sensors.ino merged with Motors_Radio_Controller.ino
// @mngyuan: below follows a list of what i did
// copied definitions from Motors_Radio_Controller to top section of file
// copied setup() from Motors_Radio_Controller into setup() function
// copied loop() from Motors_Radio_Controller into loop() function
// changed value of CURRENT_SEN_1 and EN_PIN_1 to not clash with SD card code
// commented extra Serial.begin() from SD card's setup()
// formatted code with clang-format set to Google config
//
// notes:
// * the sd card code hardcodes pin 53 as your SS pin, but it varies based on
@mngyuan
mngyuan / virgin-media.mobileconfig
Last active November 3, 2022 18:45
Connect to Virgin Media hotspot on a MacOS/iOS device using .mobileconfig
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!--
Adapted from the .mobileconfig which the Virgin Media iOS app downloads. Essentially removed the
signing payload. This approach is necessary because AFAIK it's the only way to select MSCHAPv2
as the auth method for EAP TTLS in macOS.
Replace VIRGINUSER with your Virgin login email and VIRGINPASSWORD with your password,
then open and then open System Preferences to install.