Skip to content

Instantly share code, notes, and snippets.

@simonsnow
simonsnow / snippets.js
Created April 10, 2019 18:30
[js-snips] JS Snippets
// Care of https://dev.to/healeycodes/javascript-one-liners-that-make-me-excited-56aj?utm_source=Newsletter+Subscribers&utm_campaign=4964317d7c-EMAIL_CAMPAIGN_2019_04_01_11_04&utm_medium=email&utm_term=0_d8f11d5d1e-4964317d7c-154942693
// Create an array of the past seven days, inclusive
[...Array(7).keys()].map(days => new Date(Date.now() - 86400000 * days));
// Generate a random alphanumerical string of length 11
Math.random().toString(36).substring(2);
// $=_=>`$=${$};$()`;$()
$=_=>`$=${$};$()`;$()
@simonsnow
simonsnow / index.html
Created November 21, 2017 00:00
Pure CSS Parallax Scrolling
<div id="title" class="slide header">
<h1>Pure CSS Parallax</h1>
</div>
<div id="slide1" class="slide">
<div class="title">
<h1>Slide 1</h1>
<p>Lorem ipsum dolor sit amet, in velit iudico mandamus sit, persius dolorum in per, postulant mnesarchum cu nam. Malis movet ornatus id vim, feugait detracto est ea, eam eruditi conceptam in. Ne sit explicari interesset. Labores perpetua cum at. Id viris docendi denique vim.</p>
</div>
</div>
@simonsnow
simonsnow / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console