Xerobit

Guides (320)

Practical deep-dives on the topics our tools cover, JSON, encoding, regex, timestamps, color, CSS and more. Clear explanations, tested code, no fluff.

Latest guides

Frontend & Design

AVIF Image Format: Better Compression Than WebP and JPEG

AVIF offers 50% smaller files than JPEG at equivalent quality. Learn browser support, how to convert images to AVIF with sharp and ffmpeg, and how to serve AVIF with WebP and...

4 min read
Dev Productivity

AWS EventBridge Scheduler: Cron Schedules for Lambda and AWS Services

AWS EventBridge Scheduler runs Lambda functions, ECS tasks, and other AWS targets on a cron or rate schedule. Learn how to create schedules with cron expressions, handle...

4 min read
Encoding & Crypto

Base64 PDF Embedding: Inline PDFs in HTML, JSON APIs, and Email

Embed PDF files as Base64 strings in HTML data URIs, JSON API responses, and email attachments. Learn when Base64 embedding makes sense, the size overhead, and alternatives...

4 min read
Encoding & Crypto

Base64 vs Hex Encoding: When to Use Each

Compare Base64 and hex encoding for binary data. Learn which is more compact, when to use each in APIs, cryptography, and storage, with JavaScript and Python examples.

4 min read
Encoding & Crypto

bcrypt Password Hashing: Why You Should Use bcrypt and How to Implement It

bcrypt is the standard password hashing algorithm for web applications. Learn why MD5 and SHA-256 are wrong for passwords, how bcrypt's work factor prevents brute-force...

5 min read
Dev Productivity

Binary Arithmetic: Addition, Subtraction, and Two's Complement

Learn how computers perform binary arithmetic: binary addition with carry, two's complement for negative numbers, overflow detection, and how CPUs handle integer operations in...

5 min read
Dev Productivity

Bitmask and Bitwise Operations: Flags, Permissions, and Bit Manipulation

Bitmasks store multiple boolean flags in a single integer using bitwise AND, OR, and XOR. Learn how to set, clear, and check bits for file permissions, feature flags, and game...

4 min read
Frontend & Design

CSS Box Shadow Performance: GPU Compositing and Repaint Optimization

Box shadows can hurt scroll and animation performance if used incorrectly. Learn which shadow properties trigger repaints, how to move shadows to the compositor layer, and...

4 min read
Encoding & Crypto

Brute Force Password Attacks: How They Work and How to Defend Against Them

Brute force attacks try every possible password combination. Learn how attackers estimate crack times, why GPU speed matters, how bcrypt/Argon2 slow attacks, and what password...

5 min read
Dev Productivity

User-Agent Client Hints: Modern Browser Detection Without UA Sniffing

User-Agent Client Hints replace UA string parsing with structured HTTP headers. Learn how Sec-CH-UA headers work, how to request high-entropy hints, and how to use the...

4 min read
Frontend & Design

Critical CSS Inlining: Eliminate Render-Blocking CSS for Faster Load

Critical CSS inlining embeds above-the-fold styles directly in HTML to eliminate render-blocking requests. Learn how to extract critical CSS with tools like critical,...

5 min read
Frontend & Design

CSS aspect-ratio Property: Modern Intrinsic Sizing Without Padding Hacks

The CSS aspect-ratio property creates boxes with a fixed width-to-height ratio. Learn how it replaces the padding-top hack, works with images and video embeds, and handles...

4 min read
Frontend & Design

CSS flex-order Property: Reorder Flex Items Without Changing HTML

The CSS order property reorders flex items visually without changing the DOM. Learn how to use order for responsive layouts, reverse column order on mobile, and the...

4 min read
Data & Format

CSV Data Validation: Schema Validation, Type Checking, and Error Reporting

Validate CSV files before importing them into a database or processing pipeline. Learn how to check required columns, validate data types, enforce email/date/numeric formats,...

5 min read
Data & Format

Import CSV to Database: PostgreSQL, MySQL, SQLite, and Node.js

Import CSV files into PostgreSQL, MySQL, and SQLite using COPY commands, LOAD DATA INFILE, and Node.js streaming inserts. Covers bulk import performance, handling encoding...

5 min read
Data & Format

CSV with Python pandas: read_csv, to_json, Data Cleaning, and Export

Read, clean, and convert CSV files with Python pandas. Covers pd.read_csv() options, handling missing values, type conversion, filtering, groupby aggregations, and exporting to...

5 min read
Dev Productivity

CUID2: Collision-Resistant IDs Better Than UUID v4

CUID2 generates secure, URL-safe, database-friendly IDs with better collision resistance than UUID v4. Learn how CUID2 differs from UUID, nanoid, and ULID, with JavaScript and...

4 min read
Frontend & Design

CSS Design Tokens: Define Spacing, Colors, and Typography with Custom Properties

CSS design tokens store reusable values as custom properties (CSS variables). Learn how to define rem-based spacing and type scales, organize tokens by category, and share...

5 min read
Dev Productivity

DHCP IP Allocation: How Dynamic IP Assignment Works

DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses, subnet masks, gateways, and DNS servers to devices. Learn how the DORA process works, DHCP lease...

4 min read
Encoding & Crypto

Diceware Passphrases: Stronger and More Memorable Than Passwords

Diceware generates memorable passphrases by rolling dice to select words from a numbered list. Learn why 5-word diceware beats complex passwords, how to generate passphrases in...

4 min read
Dev Productivity

Double URL Encoding: What It Is, Why It Happens, and How to Prevent It

Double URL encoding happens when an already-encoded URL is encoded again, turning %20 into %2520. Learn how to detect it, prevent it in APIs and proxies, and why attackers...

4 min read
Dev Productivity

Epoch Time Explained: What Is Unix Epoch and Why Does It Start January 1, 1970?

Unix epoch time counts seconds from January 1, 1970 00:00:00 UTC. Learn why 1970 was chosen, how to work with epoch time in JavaScript and Python, the Year 2038 problem, and...

4 min read
Frontend & Design

Favicon Caching: Force Browser Refresh After Favicon Change

Browsers aggressively cache favicons, sometimes for days or weeks. Learn how to bust the favicon cache with versioned URLs, HTTP cache headers, and the fastest way to force a...

4 min read
Frontend & Design

CSS flex-grow, flex-shrink, flex-basis: The Flex Property Explained

The CSS flex shorthand controls three properties: flex-grow (how much to expand), flex-shrink (how much to contract), and flex-basis (initial size). Learn the common values,...

5 min read