RSS Amplifier

Blog

Konstantin Lebedev blog

Personal and technical blog

konstantinlebedev.comRSS feed ↗13 posts

Latest posts

Hacker Holidays CTF writeup

Bypassing automated traffic detection

How bot detection really works — from User-Agent and header checks to TLS fingerprinting — and why your scripts get a 403 while the browser gets through.

Staying safe in a wake of supply-chain attacks

A layered defense against npm supply-chain attacks — a repo .npmrc that disables lifecycle scripts and delays installs, plus Safe Chain malware scanning.

TypeScript: advanced and esoteric

Explore advanced TypeScript types — conditional, inferred and recursive generics — then push them to the esoteric: doing arithmetic with types alone.

Applying SOLID principles in React

How to apply the five SOLID design principles to React — adapting object-oriented best practices to functional components, hooks and composition.

10 security tips for frontend developers

Ten practical security tips for frontend developers — from content security policy and security headers to preventing XSS and clickjacking attacks.

Animating between units with react-spring

Learn how to animate between mismatched CSS units — pixels, percentages, rems and viewport values — in React using the react-spring useSpring hook.

Horizontal scroll animation

Build a playful horizontal scroll animation in React where items flip with the scroll direction, using react-spring and react-use-gesture.

Intro to Framer Motion

A hands-on introduction to Framer Motion — build animations in React from simple fades to advanced orchestration using its declarative API.

Rematch with Hooks

How React Redux hooks simplify Rematch — swap mapState, mapDispatch and the connect HOC for useSelector and useDispatch to get cleaner, fully typed code.

Typing components in Next.JS applications

How to type React and Next.js components with TypeScript, including getInitialProps — a guide for Next.js apps built prior to version 9.

Type aliases vs. interfaces in TypeScript-based React apps

Type aliases vs. interfaces in TypeScript — how they differ, when to use each, and why type aliases are the better default in React applications.

How to dynamically add attributes to your ActiveRecord models

A Ruby on Rails tutorial on adding attributes to ActiveRecord models at runtime with the active_dynamic gem, for models with unknown attributes.