Skip to content

Instantly share code, notes, and snippets.

View ludovicm67's full-sized avatar
🎯
Focusing

Ludovic Muller ludovicm67

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ludovicm67 on github.
  • I am ludovicm67 (https://keybase.io/ludovicm67) on keybase.
  • I have a public key ASAaufX5zF-WiMOEHXau_cy9ZGEH8xCFyLr_I579br3xygo

To claim this, I am signing this object:

# just install grouce
sudo apt install gource
# make sure you are in a git repository before running the following command
gource \
-s .6 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
@ludovicm67
ludovicm67 / js-appendChilds.md
Last active December 11, 2018 13:32
Ajout de la méthode 'appendChilds' pour ajouter plusieurs éléments en une fois

element.appendChilds()

HTMLElement.prototype['appendChilds'] = function () {
	for (var i = 0; i < arguments.length; i++) this.appendChild(arguments[i]);
}

Usage : element.appendChilds(elem1, elem2, ...);

@ludovicm67
ludovicm67 / js-newElem.md
Created May 5, 2016 17:39
Créer de nouveaux éléments JavaScript très rapidement

La fonction magique

Pour commencer, voici cette toute petite fonction très utile :

function newElem(elem, attrs) {
	return Object.assign(document.createElement(elem), attrs);
}