An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
In all of my coding projects, I like to follow these principles:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>IndexedDB Example</title> | |
</head> | |
<body> | |
<h1>IndexedDB Example</h1> | |
<p> |
An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
In all of my coding projects, I like to follow these principles:
REST API response format based on some of the best practices
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:
$ git config --global commit.gpgsign true
([OPTIONAL] every commit will now be signed)$ git config --global user.signingkey ABCDEF01
(where ABCDEF01
is the fingerprint of the key to use)$ git config --global alias.logs "log --show-signature"
(now available as $ git logs
)$ git config --global alias.cis "commit -S"
(optional if global signing is false)$ echo "Some content" >> example.txt
$ git add example.txt
$ git cis -m "This commit is signed by a GPG key."
(regular commit
will work if global signing is enabled)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 = |
# 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 |