Skip to content

Instantly share code, notes, and snippets.

View lazuee's full-sized avatar
:shipit:
Lazuee

John Marlo Lapiz lazuee

:shipit:
Lazuee
View GitHub Profile

DynamicInterval

Lightweight scheduler for running arbitrary work on a dynamic interval. Ideal for backoff retry loops, background autosaves, and heartbeat polling. Ensures runs never overlap and supports adaptive delays, jitter, and full lifecycle controls.

Features

  • Non-overlapping runs (no reentrancy) with automatic rescheduling after each run
  • Dynamic delay calculation via strategies (exponential, linear, constant, or custom)
  • Jitter support to avoid thundering herds (none, full, or bounded ±percentage)
  • Lifecycle controls: start, pause, resume, stop, runNow, resetBackoff
@alexanderbuhler
alexanderbuhler / README.md
Last active December 31, 2025 14:52
Tailwind v4 polyfill / browser compatibility configuration

This gist may be your full solution or just the starting point for making your Tailwind v4 projects backwards compatible.

What it does

  • Effectively getting browser support down to Chrome 99 (and basically everything supporting @layer)
  • Pre-compute oklab() functions
  • Pre-compute color-mix() functions (+ replace CSS vars inside them beforehand)
  • Remove advanced instructions (colorspace) from gradients
  • Provide support for nested CSS (used by dark mode or custom variants with &)
  • Transform translate, scale, rotate properties to their transform: ... notation
  • Add whitespace to var fallbacks var(--var,) > var(--var, ) to help older browsers understand
@lazuee
lazuee / ngrok-rdp.yml
Created August 7, 2024 07:56
Windows 10 Free RDP - Ngrok
#.github/workflows/main.yml
name: Windows - Ngrok
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active January 29, 2026 00:24
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@OrionReed
OrionReed / dom3d.js
Last active January 26, 2026 18:59
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@ixahmedxi
ixahmedxi / keybindings.json
Created January 2, 2024 20:46
Vscode neovim keybindings.json
[
{
"command": "vscode-neovim.compositeEscape1",
"key": "j",
"when": "neovim.mode == insert && editorTextFocus",
"args": "j"
},
{
"command": "vscode-neovim.compositeEscape2",
"key": "k",
@ixahmedxi
ixahmedxi / init.vim
Created January 2, 2024 20:46
vscode neovim init.vim
" packadd quickscope
" execute 'luafile ' . stdpath('config') . '/lua/settings.lua'
function! s:manageEditorSize(...)
let count = a:1
let to = a:2
for i in range(1, count ? count : 1)
call VSCodeNotify(to == 'increase' ? 'workbench.action.increaseViewSize' : 'workbench.action.decreaseViewSize')
endfor
endfunction
@ixahmedxi
ixahmedxi / settings.json
Created January 2, 2024 20:45
VSCode settings.json
{
// open json editor for settings
"workbench.settings.editor": "json",
// Theme
"workbench.colorTheme": "Aura Dark",
"workbench.iconTheme": "moxer-icons",
// Change font
"editor.fontFamily": "Geist Mono",
@jdunkerley
jdunkerley / Guide.md
Last active May 8, 2025 20:03
Set up a Windows 10 machine from empty to ready to build Enso
@lazuee
lazuee / movement_controller.gd
Last active September 30, 2023 09:17
Godot 4 Beta 1 - Click to Move with NavigationAgent2D
extends Node2D
class_name MovementController
var player : CharacterBody2D = null
func _ready():
var parent = self.get_parent()
if parent:
if parent.get_class() == "CharacterBody2D": player = parent