Skip to content

Instantly share code, notes, and snippets.

View arlg's full-sized avatar

Aurélien G. arlg

View GitHub Profile
@ai
ai / requirements.md
Last active December 19, 2023 14:19
Website requirements

Amplifr logo

Amplifr Landings Rules

Amplifr’s rules for landing pages created by outsource.

Requirements

@Grafikart
Grafikart / DOMAnimation.js
Last active May 25, 2022 09:17
Permet d'animer des éléments HTML
class DOMAnimations {
/**
* Masque un élément avec un effet de repli
* @param {HTMLElement} element
* @param {Number} duration
* @returns {Promise<boolean>}
*/
static slideUp (element, duration = 500) {
return new Promise(function (resolve, reject) {
element.style.height = element.offsetHeight + 'px'
@arlg
arlg / Good Javascript
Last active October 15, 2018 10:37
Javascript the good way
/*FOR LOOPS
-------------------------------------------*/
//SLOW -> (no caching of the length)
for (var i = 0; i < myArray.length; i++) {}
//GOOD -> (caching the length) : http://jsperf.com/forloops3
for (var i = 0, l = myArray.length; i < l; i++) {}
//BEST -> backwards for loop + caching the length : http://jsperf.com/forward-and-backward-for-loops/2