Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Snow simonsnow

View GitHub Profile
@simonsnow
simonsnow / snippets.js
Created Apr 10, 2019
[js-snips] JS Snippets
View snippets.js
// 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 Nov 21, 2017
Pure CSS Parallax Scrolling
View index.html
<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 Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.