Skip to content

Instantly share code, notes, and snippets.

View Vuzereus's full-sized avatar
💭
I may be slow to respond.

Vuzereus

💭
I may be slow to respond.
View GitHub Profile
@Vuzereus
Vuzereus / ffmpeg-common.sh
Created November 12, 2023 13:36 — forked from tiantuxu/ffmpeg-common.sh
Common ffmpeg Command Lines (with NVIDIA GPU Support)
# Decode a video to yuv420 raw format
ffmpeg -vsync 0 -c:v h264_cuvid -i input.mp4 -c:v rawvideo -pix_fmt yuv420p -f null /dev/null
ffmpeg -vsync 0 -c:v h264_cuvid -i input.mp4 -c:v rawvideo -pix_fmt yuv420p output.yuv
# Resize videos to 640x480
ffmpeg -c:v h264_cuvid -i input.mp4 -vf scale=640:480 -c:v h264_nvenc output.mp4
# Downsampling frame rate to 30fps
ffmpeg -i input.mp4 -r 30 -c:v h264_nvenc output.mp4
@Vuzereus
Vuzereus / video_and_hardware_display_resolution.txt
Last active October 22, 2023 04:50
Video and hardware display resolutions in vertical, horizontal, display ratio, megapixel
HD – High-definition
All standard HD resolutions share a 16∶9 aspect ratio
-------------------------------------------------------------------
Name Horiz Vert Ratio H × V = Mpx
(px) (px) H:V Megapixel
-------------------------------------------------------------------
nHD 640 360 16:09 0.23
qHD 960 540 16:09 0.518
HD 1280 720 16:09 0.922
HD+[33] 1600 900 16:09 1.44
function calcDistanceInMetresBetweenTwoPoints(Point1, Point2) {
const EARTH_RADIUS = 6371e3; // 6,371,000 metres
const latitude1 = (Point1.lat * Math.PI) / 180;
const latitude2 = (Point2.lat * Math.PI) / 180;
const deltaLatitude = ((Point2.lat - Point1.lat) * Math.PI) / 180;
const deltaLongitude = ((Point2.lon - Point1.lon) * Math.PI) / 180;
const angle =
@Vuzereus
Vuzereus / gpg_git_signing.md
Created September 11, 2023 16:16 — forked from igorjs/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@Vuzereus
Vuzereus / rest-api-response-format.md
Created September 11, 2023 16:10 — forked from igorjs/rest-api-response-format.md
REST API response format based on some of the best practices
@Vuzereus
Vuzereus / simple-multi-threaded-php-web-server.md
Created September 10, 2023 14:26 — forked from Jiab77/simple-multi-threaded-php-web-server.md
An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
@Vuzereus
Vuzereus / indexeddb.html
Created September 7, 2023 13:36 — forked from jdiamond/indexeddb.html
IndexedDB Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IndexedDB Example</title>
</head>
<body>
<h1>IndexedDB Example</h1>
<p>
@Vuzereus
Vuzereus / AngelOnlineElementaryQuestion.csv
Last active August 5, 2020 14:31
AngelOnlineElementaryQuestion
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Number,Category,Question,First,Uhh,Last
"1","Astronomy","The North Star is commonly used to tell the direction. What constellation does it belong to?","Ursa Minor","Lyra","Centaurus"
"2","Astronomy","If you rank planets starting from the one closest to the sun as the first, which would Earth be?","Third","Second","First"
"3","Astronomy","The earth revolves around the sun. What shape is the orbit?","Ellipse","Round","Sphere"
"4","Astronomy","How long does the earth take to make one orbit?","About 365.25 solar days","About 365 solar days","About 366 solar days"
"5","Astronomy","The magnitude of stars are classed as I, II, III, IV, V, VI and VII. What does I represent?","Supergiant star","Subgiant star","Subdwarf star"
"6","Astronomy","The composition of a normal star's atmosphere is similar to that of the sun. Which element is the most abundant?","Hydrogen","Nitrogen","Oxygen"
"7","Astronomy","The sun is known as a yellow star. What is it classified as?","Dwarf star","White dwarf star","Subgiant star"
"8","Ast
Hopefully your knowledge about India politic should improve, go India politic for future of mankind ! FCK!
"1" Category="Astronomy" question="The North Star is commonly used to tell the direction. What constellation does it belong to?" Choice 1="Ursa Minor" Choice 2="Lyra" Choice 3="Centaurus" Hint="First"
"2" Category="Astronomy" question="If you rank planets starting from the one closest to the sun as the first, which would Earth be?" Choice 1="Third" Choice 2="Second" Choice 3="First" Hint="First"
"3" Category="Astronomy" question="The earth revolves around the sun. What shape is the orbit?" Choice 1="Ellipse" Choice 2="Round" Choice 3="Sphere" Hint="First"
"4" Category="Astronomy" question="How long does the earth take to make one orbit?" Choice 1="About 365.25 solar days" Choice 2="About 365 solar days" Choice 3="About 366 solar days" Hint="First"
"5" Category="Astronomy" question="The magnitude of stars are classed as I, II, III, IV, V, VI and VII. What does I represent?" Choice 1="Supergiant star" Ch