gulp.task('default', () => {
return gulp
.src('./build/*.html')
.pipe(replace('.js"></script>', '.js" inline></script>'))
.pipe(replace('rel="stylesheet">', 'rel="stylesheet" inline>'))
.pipe(
inlinesource({
compress: false,
ignore: ['png'],
})
)
.pipe(gulp.dest('./build'));
});
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80
}
This post suggests the top 6 snippets you need to keep in your Chrome DevTools to help you experiment and build better apps.
While I regularily use services like Buddy or DeployHQ to build and deploy Craft CMS websites, I wanted to experiment with Github Actions. Here is what I came up with and why.
/etc/nginx/conf.d/mod-http-passenger.conf
!/bin/bash
download mjpg-streamer:
git clone https://github.com/jacksonliam/mjpg-streamer.git
install libjpeg and cmake
apt-get install cmake libjpeg9-dev
make and install mjpg-streamer
cd mjpg-streamer/mjpg-streamer/mjpg-streamer-experimental
make
sudo make install
add stream script
sudo nano stream.sh
paste and edit accordingly your webcam settings
#!/bin/sh
PORT="8080"
ID="Raspberry Pi Web Cam"
PW="1234"
SIZE="1280x720"
FRAMERATE="60"
export LD_LIBRARY_PATH=/usr/local/lib
mjpg_streamer -i "input_uvc.so -f $FRAMERATE -r $SIZE -d /dev/video0 -y" -o "output_http.so -w /var/www/html -p $PORT"
add execute permission and run script (maybe create service)
sudo chmod +x stream.sh
./stream.sh
setup apache or nginx, create /var/www/html/index.html and add
<html>
<body>
<h1>Raspberry Pi Web Camera!</h1>
<img src="https://192.168.1.68:8080/?action=stream" />
</body>
</html>
finally got to configured ip address
YouTube is owned by Google and Google likes to have a reasonable number of images for different screen sizes, hence its images are stored in different sizes. Here is an example of how your thumbnail will be like:
Low quality thumbnail:
http://img.youtube.com/vi/<YouTube_Video_ID_HERE>/sddefault.jpg
Medium quality thumbnail:
http://img.youtube.com/vi/<YouTube_Video_ID_HERE>/mqdefault.jpg
High quality thumbnail:
http://img.youtube.com/vi/<YouTube_Video_ID_HERE>/hqdefault.jpg
Maximum quality thumbnail:
http://img.youtube.com/vi/<YouTube_Video_ID_HERE>/maxresdefault.jpg
