Skip to content

Instantly share code, notes, and snippets.


Pierre CLÉMENT pierrecle

View GitHub Profile
View alphabeticAnagrams.js
class Anagram {
constructor(word) {
this.word = word;
get uniqChars() {
var chars = this.word.split('').filter((letter, index) => this.word.indexOf(letter,index+1) === -1);
return chars;
View Snail.js
class Snail {
static rotate(array) {
return array[0].map((_, lineIndex) => {
var lineLength = array[0].length;
return, eltIndex) => {
return array[eltIndex][lineLength - lineIndex - 1];
pierrecle / knightVsKing.js
Created Mar 9, 2016
My implementation for the dojo knight vs king
View knightVsKing.js
// Sorry, I lost the tests..
'use strict';
class Fight {
constructor(knightPosition, kingPosition) {
this.knightPosition = Fight.cleanPosition(knightPosition);
this.kingPosition = Fight.cleanPosition(kingPosition);
static cleanPosition(rawPosition) {
View Installer Xpenology sur un NAS

Installer Xpenology sur un NAS ReadNas


Le NAS utilisé ici est un NAS avec processeur Intel 64 bits, un Netgear ReadyNAS Ultra 2 (RNDU2000).

Liste de courses :

  • une clé USB pour mettre XPEnoboot


View Installer Debian sur un NAS
pierrecle / pre-commit
Last active Oct 13, 2015
Hook to prevent accidental commit on master branch
View pre-commit
# Stops accidental commits to master
# Inspired from
# To download: curl -fL -o ".git/hooks/pre-commit" "" && chmod +x .git/hooks/pre-commit
BRANCH=`git rev-parse --abbrev-ref HEAD`
if [[ "$BRANCH" == "master" ]]; then
echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?"
echo "If so, commit with -n to bypass this pre-commit hook."
pierrecle / tasks.json
Created Oct 7, 2015
Visual Studio Code problem matcher for Karma tests on Typescript files with sourcemaps.
View tasks.json
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"tasks": [
"taskName": "test",
You can’t perform that action at this time.