Skip to content

Instantly share code, notes, and snippets.

View jason-shen's full-sized avatar
🗼
Coding........

Jason Shen jason-shen

🗼
Coding........
View GitHub Profile
//Self-Signed Certificate for using with VS Code Live Server
//Save both files in a location you will remember
1. create a private key
openssl genrsa -aes256 -out localhost.key 2048
// you will be prompted to provide a password
//this will create localhost.key (call it whatever you like)
2. create the certificate
@jason-shen
jason-shen / gstreamermixer.md
Last active July 31, 2022 17:01
gstreamer video mix

#gstreamer mixer

gst-launch-1.0 -e \
videomixer name=mix background=1 \
        sink_1::xpos=0   sink_1::ypos=0 \
        sink_2::xpos=200 sink_2::ypos=0 \
        sink_3::xpos=0 sink_3::ypos=100 \
        sink_4::xpos=200 sink_4::ypos=100 \
    ! autovideosink \
@jason-shen
jason-shen / instructions.md
Created May 25, 2023 08:21 — forked from matthewjberger/instructions.md
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@jason-shen
jason-shen / HaversinFormula.go
Created October 28, 2023 15:39 — forked from cdipaolo/HaversinFormula.go
Golang functions to calculate the distance in meters between long,lat points on Earth.
// haversin(θ) function
func hsin(theta float64) float64 {
return math.Pow(math.Sin(theta/2), 2)
}
// Distance function returns the distance (in meters) between two points of
// a given longitude and latitude relatively accurately (using a spherical
// approximation of the Earth) through the Haversin Distance Formula for
// great arc distance on a sphere with accuracy for small distances
//
@jason-shen
jason-shen / gmeet.js
Created March 16, 2025 07:58 — forked from rahulvramesh/gmeet.js
Google Meet Recorder Using playwright and firefox
const { devices, firefox, chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({headless: false});
const context = await browser.newContext({
permissions: ['geolocation', 'microphone', 'camera'],
colorScheme: 'dark',
recordVideo: {
dir: 'videos/',
size: { width: 1920, height: 1080 },
}