Skip to content

Instantly share code, notes, and snippets.

@lgescobar
lgescobar / Infi-Cont-Marquee.html
Last active May 12, 2020 15:14 — forked from Jaskaranbir/Infi-Cont-Marquee.html
Inifinite Continuous Scrolling Marquee in CSS without any explicit framework
<div id="maindiv">
<!-- Need to have two divs with same content.
One div will translate completely out of parent and other div will fill the void till the transition for first div starts again. -->
<div id="div1">
&nbsp;Test-1 Test-2 Test-3 Test-4 Test-5 Test-6 Test-7 Test-8 Test-9 Test-10 Test-11
</div>
<div id="div2">
&nbsp;Test-1 Test-2 Test-3 Test-4 Test-5 Test-6 Test-7 Test-8 Test-9 Test-10 Test-11
</div>
</div>
@lgescobar
lgescobar / RawFrontend.php
Created June 10, 2018 18:55
Simple LRU cache for TYPO3
<?php
namespace Vendor\Product\Cache\Frontend;
/* *************************************************************
* Copyright notice
*
* (c) 2018 Luis Antonio García Escobar <[email protected]>
*
* All rights reserved
*
@lgescobar
lgescobar / sw.js
Last active April 8, 2018 11:02
Basic service worker to cache only selected paths from the installed domain and serve them from cache in case of server error.
let version = 1;
let cacheName = self.location.hostname + version;
let allowedPaths = [
/^\/(\?utm_source=homescreen)?$/,
// Also matches /article/news/... !!
/\/news\/?.*$/
];
self.addEventListener('install', (e) => {
e.waitUntil(