Skip to content

Instantly share code, notes, and snippets.

View EnzDev's full-sized avatar
🥐
Croissants & dev

Enzo Mallard EnzDev

🥐
Croissants & dev
View GitHub Profile
@EnzDev
EnzDev / index.html
Last active March 9, 2022 14:44
Wordle in 63 lines
<div style="min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center;">
<style>
#try > div { display: flex; } #try > div:first-child { margin-bottom: 40px; }
#try > div > span { display: inline-flex; width: 40px; height: 40px; margin: 5px; justify-content: center; align-items: center; }
</style>
<div id="try"></div><div id="error"></div>
<div>
<input type="text" id="guess" name="guess" onsubmit="guess()">
<button onclick="guess()">try</button>
</div>
@EnzDev
EnzDev / package.json
Last active March 9, 2022 11:15
A quickly developped scrapper to retreive ords in the larousse website index
{
"name": "quick-scrap-larousse",
"version": "1.0.0",
"description": "Get all the words from larousse",
"main": "quick-scrap.js",
"author": "EnzDev",
"license": "ISC",
"dependencies": {
"cheerio": "^1.0.0-rc.10",
"request-promise": "^4.2.6"
@EnzDev
EnzDev / Animator.kt
Created August 3, 2020 13:50
L'implémentation qui marche pas
import org.openrndr.animatable.Animatable
import org.openrndr.draw.Drawer
abstract class DrawableAnimatable : Animatable() {
abstract fun draw(drawer: Drawer)
}
class Toaster(private val message: String): DrawableAnimatable() {
private val y: Double = -10.0
#!/bin/bash
# Require root perms, try to elevate
if [ "$EUID" -ne 0 ]; then
echo "Need to have root privilege (uid: $UID | euid: $EUID )"
exit
fi
yum install --assumeyes -q tmux zsh zip unzip wget curl
wget -O ~/.zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
@EnzDev
EnzDev / ninji_insect_tracker.user.js
Last active April 24, 2020 16:22
A userscript to track caught and catchable insects in animal crossing on @_Ninji website
// ==UserScript==
// @name @_Ninji insect tracker
// @description This userscript allows tracking caught and catchable insects on @_Ninji's website page about 1.2.0 update of AC:NH that list impacts on insects spawns.
// @version 2.1
// @author github.com/EnzDev
// @match https://wuffs.org/acnh/insects120.html
// @grant GM.setValue
// @grant GM.getValue
// @noframes
// @run-at document-end
@EnzDev
EnzDev / obduction_numbering.py
Last active July 22, 2019 22:03
generate obduction numbering system
from PIL import ImageDraw, Image
__description__ = """This program convert arabic numbers to a Numerical Notation that is used in the game Obduction.
I did it based on what I remember and the real way of representing the numbers in that game may be a little different.
It's based on a base 4 numbering system where a digit is displayed
on a slanted 3x3 grid and the number is on a 5x5 grid. Let's use cardinal directions to help visualize.
For one digit:
A 0 is no line
@EnzDev
EnzDev / Complex.kt
Last active June 7, 2019 14:38
Doing something with Mandelbrot... Again (But with Kotlin and coroutines this time!)
import kotlin.math.pow
import kotlin.math.sqrt
data class Complex(val re: Double, val im: Double) {
companion object {
val zero = Complex(0.0, 0.0)
}
@EnzDev
EnzDev / mandelbrot.py
Last active December 6, 2021 07:53
Mandelbrot in Python
from PIL import Image, ImageDraw
import time
__version__ = "v1.3.4-Optimisations"
__author__ = "Enzo Mallard"
# Dimension of the picture (define the resolution)
WIDTH_PIX = HEIGHT_PIX = 1_000
# Maximum number of iterations
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
rel="stylesheet"
href="https://meyerweb.com/eric/tools/css/reset/reset.css"
/>
# Parse an input with some currencies conversions and use Dijkstra to find a path to convert
from functools import reduce
""" Input should look like this :
FROM_CUR;AMOUNT;TO_CUR
Number of conversions
FROM_CUR;TO_CUR;UNIT_CONVERSION
FROM_CUR;TO_CUR;UNIT_CONVERSION
FROM_CUR;TO_CUR;UNIT_CONVERSION