Skip to content

Instantly share code, notes, and snippets.

@gulhe
gulhe / README.md
Last active April 30, 2024 12:44
Bash Arrays Cheat Sheet

Bash Arrays

Declaration

📁 Array

#optional
declare -a array

🗂️ Associative Array

@gulhe
gulhe / Carte.md
Last active December 17, 2023 21:04
Carte de Noël trop longue, pas pratique à lire et (volontairement) exagérément alambiquée

Yo ho ho !

Comme le veut une conjonction d'innombrables¹ traditions voilà du miel, j'espère qu'il vous plaira.

Joyeux Noël !


¹ Petite précision pour réconcilier mes tendances littéraires et mon cursus un peu plus matheux, oui, il est idiomatiquement correcte de dire innombrable² mais il ne faut pas confondre avec indénombrable tant on pourrait, avec un savoir infini, compter le nombre, si grand soit-il, de traditions impliquées et que ce nombre serait, vous en conviendrez, fini et entier

@gulhe
gulhe / Curry Vegan.md
Last active January 11, 2023 17:42
Recette perso de curry vegan.

Curry Vegan

Description

Ceci est une recette de curry végétalien dont on m'a demandé la recette.

Warnings

{
"basics": {
"name": "Gu... Lhe... (dit \"le GuJ\")",
"email": "l***g@gmail.com",
"label": "Dev Senior / \"Coach\" Crafts",
"location": {
"address": "█████████████",
"postalCode": "94███",
"city": "██████████",
"countryCode": "FR"
@gulhe
gulhe / Roll.js
Last active February 5, 2021 10:59
Emoji roller
function roll(array){
array.rollIndex=(array.rollIndex||0)%array.length;
return array[array.rollIndex++];
}
@gulhe
gulhe / Day_01.js
Last active December 12, 2020 00:45
Advent Of Code 2020
/*Part 1*/
document.body.innerText.trim().split(/\n/g).map(Number)
.filter((e,_,t)=>t.some(te=>te+e===2020))
.reduce((a,b)=>a*b)
/*Part 2*/
document.body.innerText.trim().split(/\n/g).map(Number)
.filter((e,_,t)=>t.some(te=>t.some(tte=>tte+te+e===2020)))
.reduce((a,b)=>a*b)
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
/********************
* theLongWayOut.js *
********************
*
* Well, it looks like they're on to us. The path isn't as
* clear as I thought it'd be. But no matter - four clever
* characters should be enough to erase all their tricks.
*/
function startLevel(map) {
/************************
* validationEngaged.js *
************************
*
* They're really on to us now! The validateLevel function
* has been activated to enforce constraints on what you can
* do. In this case, you're not allowed to remove any blocks.
*
* They're doing all they can to keep you here. But you
* can still outsmart them.
/************************
* validationEngaged.js *
************************
*
* They're really on to us now! The validateLevel function
* has been activated to enforce constraints on what you can
* do. In this case, you're not allowed to remove any blocks.
*
* They're doing all they can to keep you here. But you
* can still outsmart them.