Skip to content

Instantly share code, notes, and snippets.

View meodai's full-sized avatar
🐙
Probably coloring things

David Aerne meodai

🐙
Probably coloring things
View GitHub Profile
@meodai
meodai / apatschi.fn.fish
Last active May 9, 2025 13:06
Fish shell function that runs a local server on a given direcotry
# Usage: apatschi [directory]
# Description: Starts a local server with BrowserSync for the specified directory.
function apatschi
set dir "."
if test (count $argv) -gt 0
set dir $argv[1]
end
if not test -d $dir
#!/usr/bin/env fish
function show_spinner
set -l pid $argv[1]
set -l text $argv[2]
set -l spinner_chars "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"
set -l i 1
while kill -0 $pid 2>/dev/null
printf "\r%s %s " (string sub -s $i -l 1 $spinner_chars) $text
@meodai
meodai / BaseWebComponent.ts
Last active October 28, 2024 12:21
webcomponent boilerplate
/**
* Web Component Boilerplate
* ------------------------
* This boilerplate provides a foundation for creating Web Components using TypeScript.
* It implements best practices and common patterns for building maintainable,
* type-safe custom elements.
*
* Key Features:
* - TypeScript support with strict typing
* - Shadow DOM encapsulation
@meodai
meodai / ...fish
Last active April 2, 2024 11:00
terminal helpers: A collection of fish / sometimes bash scripts that help me make life a bit easier
function ..
cd ..
end
function tv7
echo "Fetching new playlist"
set tvcurl (curl --fail https://api.init7.net/tvchannels.xspf -o ~/Movies/Fiber7.TV.tmp.xspf);
if test tvcurl
echo "Refreshing playlist"
if test -e ~/Movies/Fiber7.TV.xspf
rm ~/Movies/Fiber7.TV.xspf
end
if test -e ~/Movies/Fiber7.TV.tmp.xspf
mv ~/Movies/Fiber7.TV.tmp.xspf ~/Movies/Fiber7.TV.xspf
@meodai
meodai / index.html
Created March 7, 2024 12:53
Scale Spread Array and generator function
<div class="array">Original</div>
<div class="generator">Generator</div>
<div class="optimizedArray">Combo</div>
@meodai
meodai / jeux7ans.md
Last active November 24, 2024 13:17
Jeux retro pour enfants
  1. Bust a Move 4 (PS1)

Description : Un jeu de puzzle à la Tetris, facile à prendre en main. Les enfants adoreront les défis colorés tout en améliorant leurs compétences de résolution de problèmes.

  1. Super Mario All-Stars

Description : Une collection remastérisée des classiques de Super Mario sur Nintendo. Bien que fun, il peut être un peu difficile pour les débutants, offrant une aventure passionnante pour les jeunes joueurs.

import './style.css'
import { converter, trilerp, formatCss, easingSmoothstep } from 'culori';
const rgb = converter('rgb');
const RYB_CUBE = [ // custom RGB cube for RYB color space
{ mode: 'rgb', r: 231/255, g: 231/255, b: 232/255 }, // white point (paper background)
{
"mode": "rgb",
"r": 0.9,
@meodai
meodai / 02.js
Created January 2, 2024 18:21 — forked from mattdesl/02.js
MIT license, messy genuary2024 code... "no palettes"
import canvasSketch from "canvas-sketch";
import { degToRad, linspace, radToDeg } from "canvas-sketch-util/math";
import { Lch, contrastRatio } from "../util/color";
import polyBool from "poly-bool";
import * as random from "canvas-sketch-util/random";
import { angleLerp } from "../util/angle";
export const settings = {
suffix: random.getSeed(),
animate: true,