This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Source: https://benfrain.com/horizontal-scrolling-area-css-overflow-ios/ --> | |
<div class="outer"> | |
<div class="wrapper"> | |
<a href="" class="internal">item 1</a> | |
<a href="" class="internal">item 2</a> | |
<a href="" class="internal">item 3</a> | |
<a href="" class="internal">item 4</a> | |
<a href="" class="internal">item 5</a> | |
<a href="" class="internal">item 6</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Rearrange List with smooth-sliding animations</h1> | |
<p>Click on the tiles to randomly make them move among each other with a smooth 3D-like effect. Transitions are hardware accelerated with CSS3 and accompanied with under the hood DOM-manipulation.</p> | |
<p>Author: Anders Holm-Jensen, allora.dk - License: MIT</p> | |
<ul id="list"> | |
<li>Anders And</li> | |
<li>Andersine And</li> | |
<li>Joakim von And</li> | |
<li>Fætter Højben</li> | |
<li>Rip, rap og Rup</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- found on https://jawbone.com/up --> | |
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="0"> | |
<symbol id="microsoft-store-badge" viewBox="0 0 210 72"><title>Microsoft Store badge</title><rect width="210" height="72" rx="8" ry="8"></rect><rect x="16" y="14.93" width="20.29" height="20.29" style="fill:#f25022"></rect><rect x="38.41" y="14.93" width="20.29" height="20.29" style="fill:#7fba00"></rect><rect x="16" y="37.33" width="20.29" height="20.29" style="fill:#00a4ef"></rect><rect x="38.41" y="37.33" width="20.29" height="20.29" style="fill:#ffb900"></rect><path d="M97.84,37.8a2,2,0,0,1,.65-1.5,2.2,2.2,0,0,1,1.55-.61,2.17,2.17,0,0,1,1.59.62,2,2,0,0,1,.63,1.49,1.94,1.94,0,0,1-.64,1.48,2.22,2.22,0,0,1-1.57.6,2.19,2.19,0,0,1-1.56-.6,2,2,0,0,1-.64-1.47m4,19.83H98.21V42.24h3.62V57.63Z" style="fill:#fff"></path><path d="M112.82,55a5,5,0,0,0,1.78-.37,7.52,7.52,0,0,0,1.8-1V57a7.26,7.26,0,0,1-2,.75A10.7,10.7,0,0,1,112,58a7.32,7.32,0,0,1-7.65-7.63,8.78,8.78,0,0,1,2.17-6.11,7.86,7.86,0,0,1,6.15-2.4,8.42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isString(x) { | |
return x !== null && x !== undefined && x.constructor === String | |
} | |
function isNumber(x) { | |
return x !== null && x !== undefined && x.constructor === Number | |
} | |
function isBoolean(x) { | |
return x !== null && x !== undefined && x.constructor === Boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
How to properly nest functions returning Promises (ECMA6) in node.js (Nested Promises example) | |
generated output (with 1 second ticks) => | |
p1 function | |
p2 function | |
p3 function | |
p3 done | |
p2 done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hexToRGBA (hex, opacity = 1) { | |
const components = hex | |
.replace('#', '') | |
.match(/.{1,2}/g) | |
.map(hextet => parseInt(hextet, 16)) | |
.concat(opacity) | |
.join(', '); | |
return `rgba(${components})` | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
LICENSE: MIT | |
Created by: Anders Holm-Jensen | |
Website: allora.dk | |
Date: 25-oct-2017 | |
*/ | |
const timestamp = () => ( Math.round( new Date() * 1 / 1000) ); | |
let tracker = { | |
data: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://cdnjs.cloudflare.com/ajax/libs/js-sha1/0.6.0/sha1.min.js | |
/* | |
* [js-sha1]{@link https://github.com/emn178/js-sha1} | |
* | |
* @version 0.6.0 | |
* @author Chen, Yi-Cyuan [emn178@gmail.com] | |
* @copyright Chen, Yi-Cyuan 2014-2017 | |
* @license MIT | |
*/ | |
!function(){"use strict";function t(t){t?(f[0]=f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0,this.blocks=f):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}var h="object"==typeof window?window:{},s=!h.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s&&(h=global);var i=!h.JS_SHA1_NO_COMMON_JS&&"object"==typeof module&&module.exports,e="function"==typeof define&&define.amd,r="0123456789abcdef".split(""),o=[-2147483648,8388608,32768,128],n=[24,16,8,0],a=["hex","array","digest","arrayBuffer"],f=[],u=functio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const timestampToExcelDate = timestamp => { | |
const start = new Date("1899-12-30 00:00:00"); | |
return (timestamp - start) / (1000 * 60 * 60 * 24).toFixed(12); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class LambdaCacheController { | |
constructor() { | |
this.value = null; | |
this.timestamp = null; | |
this.ttl = 3000000; // default 5 minutes | |
} | |
async getValue() { | |
return new Promise((resolve, reject) => { | |
try { |