Skip to content

Instantly share code, notes, and snippets.

View 004Ongoro's full-sized avatar
💭
Available to code

George Ongoro 004Ongoro

💭
Available to code
View GitHub Profile
@004Ongoro
004Ongoro / techpulse_#2.js
Created April 25, 2026 09:56
Starter template for the Tech Pulse weekly newsletter issue #2 - 25/04/2026
/**
QUESTION
Write a function findFirstUnique(input) that takes a string and returns the index of the first character
that does not repeat anywhere else in the string. If every character repeats, return -1
* @param {string} s
* @return {number}
*/
function findFirstUnique(s) {
// Your logic here
// QUESTION
/*
Given a string s containing letters and ? wildcards (that can match any letter), and a target
pattern string pattern, rearrange the entire string however you like. Return the maximum number
of non-overlapping copies of pattern that can appear in the rearranged result.
*/
// SOL'N
const maxPatternCopies = (s, p) => {

Modern Fluid Typography System

Traditional responsive web design relies on "stepping" font sizes at specific breakpoints (e.g., font-size: 16px on mobile, font-size: 20px on desktop). Fluid Typography removes these jagged jumps by allowing the font size to scale linearly between a minimum and maximum value based on the viewport width (vw). The Math Behind the Fluidity The core of this implementation is the CSS clamp() function. It takes three parameters:

  • Minimum Value: The smallest the font can get (e.g., mobile).
  • Preferred Value: A dynamic unit (usually vw) that scales with the screen.
  • Maximum Value: The upper limit (e.g., large desktops).