Skip to content

Instantly share code, notes, and snippets.

View nandordudas's full-sized avatar

Nándor Dudás nandordudas

View GitHub Profile
// [TODO] no client code yet
// =============================================================================
// 1. MODERN MUTEX IMPLEMENTATION WITH NATIVE PRIVATE FIELDS & Promise.withResolvers
// =============================================================================
class Mutex {
#locked = false;
#waitQueue: Array<() => void> = [];
async lock(): Promise<void> {
if (!this.#locked) {
import type { Alarms } from 'webextension-polyfill'
import { consola } from 'consola'
import { alarms } from 'webextension-polyfill'
interface ScheduledEmail {
readonly id: string
scheduledTime: number
status: 'pending' | 'sent' | 'failed'
readonly created: number
}
HISTFILE=~/.zsh_history
HISTSIZE=50000
SAVEHIST=50000
HIST_STAMPS="mm/dd/yyyy"
setopt HIST_VERIFY
setopt SHARE_HISTORY
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_DUPS
{
"Nuxt Page Template": {
"prefix": "nuxt-page",
"scope": "vue",
"body": [
"<script lang=\"ts\">",
"//",
"</script>",
"",
"<script setup lang=\"ts\">",
FROM mcr.microsoft.com/devcontainers/php:1-8.2-bookworm
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y mariadb-client \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysqli pdo pdo_mysql
<?php
declare(strict_types=1);
namespace Database;
use PDO;
use RuntimeException;
use Throwable;
;((options) => {
const {
ONE_SECOND,
COLOR_LENGTH,
DURATION_MULTIPLIER,
RED_LIKE,
GREEN_LIKE,
BLUE_LIKE,
} = options
@nandordudas
nandordudas / 00-setup.md
Last active April 13, 2025 16:16
Setup WSL 2 on Windows 11

Windows Development Environment Setup Guide

Warning

This is a work in progress.

TODO: fzf, nvm, delta, exiftool

This guide provides step-by-step instructions for setting up a complete development environment on Windows, including WSL, package managers, and essential tools.

Table of Contents