Skip to content

Instantly share code, notes, and snippets.

View g3luka's full-sized avatar

Giovanni de Luca g3luka

View GitHub Profile
@g3luka
g3luka / .platform__nginx__conf.d__elasticbeanstalk__wordpress.conf
Created June 20, 2020 01:07
WordPress Beanstalk Nginx Amazon Linux 2
location ~ ^(/[^/]+/)?files/(.+) {
try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
access_log off; log_not_found off; expires max;
}
#avoid php readfile()
location ^~ /blogs.dir {
internal;
alias /var/app/current/wp-content/blogs.dir ;
access_log off; log_not_found off; expires max;
const imageLazyLoad = (element) => {
const src = element.getAttribute('data-src');
element.setAttribute('src', src);
element.removeAttribute('data-src');
}
const observador = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
// if (entry.isIntersecting === true || entryintersectionRatio > 0) {
if (entry.isIntersecting !== true) return;
@g3luka
g3luka / index.html
Created April 2, 2020 16:23
Element sticky fixed
<p style="margin-bottom:100px;">Scroll this page.</p>
<div class="sticky"><h3>Super amazing header</h3></div>