Skip to content

Instantly share code, notes, and snippets.

View svallory's full-sized avatar
:bowtie:
Coding like there's no tomorrow

Saulo Vallory svallory

:bowtie:
Coding like there's no tomorrow
View GitHub Profile
@svallory
svallory / colors.ts
Created December 28, 2024 04:39
Typescript type definitions for CSS Colors
/** RGB color in functional notation (e.g. rgb(255, 0, 0)) */
export type RGB = `rgb(${number}, ${number}, ${number})`;
/** RGBA color in functional notation (e.g. rgba(255, 0, 0, 0.5)) */
export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
/** HSL color in functional notation (e.g. hsl(0, 100%, 50%)) */
export type HSL = `hsl(${number}, ${number}%, ${number}%)`;
/** HSLA color in functional notation (e.g. hsla(0, 100%, 50%, 0.5)) */
@svallory
svallory / leet-math-cheat-sheet.md
Created April 25, 2025 23:45
Essential Math for Leet Code Problems

LeetCode Math Cheat Sheet

Number Theory

Prime Numbers & Primality Tests

  • Prime Number: Integer > 1 with exactly two factors (1 and itself)
  • Prime Factorization: Expressing a number as product of primes
  • Primality Test (naive): Check if any number from 2 to $\sqrt{n}$ divides n
function isPrime(n) {
@svallory
svallory / README.md
Last active June 20, 2025 17:18
Appwrite 1.7.4 on Coolify

Deploy Appwrite 1.7.4 with Wildcard SSL on Coolify

Deploy Appwrite 1.7.4 on Coolify using its built-in Traefik proxy for wildcard SSL certificates (*.example.com) via DNS challenge. This enables custom domains for Appwrite Sites and Functions.

What You'll Get

  • Main API/Console: back.example.com
  • Sites: [site-id].example.com
  • Functions: [function-id].example.com
  • Wildcard SSL certificates managed by Coolify's Traefik