git config --global credential.helper store
<?php | |
// start the output buffer | |
ob_start('compress_page'); | |
?> | |
<!-- all html content here --> | |
<?php | |
// end the buffer, echo the page content | |
ob_end_flush(); | |
// function that gets rid of tabs, line breaks, and extra spaces |
This guide is intended to assist you in maintaining an up-to-date development environment for macOS using the latest versions of Homebrew, Apache, PHP, and MariaDB.
Make a backup of your computer, but also think about exporting databases of your projects in .sql
files from PhpMyAdmin.
If you don't already have XCode installed, it's best to first install the command line tools as these will be used by homebrew:
#!/usr/bin/env bash | |
do_something() { | |
grep --help | grep '\-i' | |
grep --help | grep -e -i | |
grep --help | grep -- -i | |
} |
<video class="lazy" autoplay muted loop playsinline width="610" height="254" poster="one-does-not-simply.jpg">
<source data-src="one-does-not-simply.webm" type="video/webm">
<source data-src="one-does-not-simply.mp4" type="video/mp4">
</video>
You'll notice the addition of the poster attribute, which lets you specify a placeholder to occupy the <video>
element's space until the video is lazy-loaded. As with the <img>
lazy-loading examples, stash the video URL in the data-src
attribute on each <source>
element. From there, use JavaScript code similar to the Intersection Observer-based image lazy loading examples:
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">