Skip to content

Instantly share code, notes, and snippets.

View kabukki's full-sized avatar
🪐
Grinding

Lucien Le Roux kabukki

🪐
Grinding
View GitHub Profile
<?php
$out = shell_exec('cat /etc/passwd');
echo $out;
?>
@kabukki
kabukki / loudsky.lua
Last active February 28, 2018 01:31
LUA script to scan Loud sky room collisions to CSV
----------------------------------------
---------- Scan Loud Sky room ----------
----------------------------------------
-- Instructions:
-- . Change Coord descriptors
-- to match yours (X and Y might be swapped)
-- . Change output file directory
-- . Change scan settings
--
-- made by @kabukki
@kabukki
kabukki / helper.ts
Last active February 25, 2022 14:47
TS/JS helpers
export const wait = (delay) => new Promise((resolve) => setTimeout(resolve, delay));
export const retry = async (operation: () => Promise<unknown>, options: any = {}) => {
const { retries, delay, onError = () => {} } = options;
return operation()
.catch((err) => {
if (retries > 0) {
onError(err, retries);
return wait(delay).then(() => retry(operation, { ...options, retries: retries - 1 }));
@kabukki
kabukki / useTweenState.ts
Last active February 12, 2024 22:55
useTweenState
import { useRef, useState } from 'react';
export type EasingFunction = (progress: number) => number;
export type InterpolateFunction <T> = (a: T, b: T) => (time: number) => T
/**
* Returns a state that can be tweened with an interpolator and easing function.
* - https://d3js.org/d3-interpolate
* - https://d3js.org/d3-ease
*/