Written in 2021 ⏳
Dec
Intersperse element between elements
24 Dec, 2021
Wrap a number between two values
13 Dec, 2021
Nov
Format a string
10 Nov, 2021
Omit properties of a Svelte component
03 Nov, 2021
Oct
Generate an array of alphabet characters
22 Oct, 2021
Check if a character is a digit
22 Oct, 2021
Go to the previous directory
17 Oct, 2021
Jul
Repeat an array
21 Jul, 2021
Jun
Pick random lines from a text document
01 Jun, 2021
May
Remove duplicate lines of a text document
31 May, 2021
Reverse the order of lines of a text
30 May, 2021
Remove empty lines of a text document
28 May, 2021
Replace all tab characters with spaces
27 May, 2021
Count the number of words in a string
26 May, 2021
Normalize the ratio of a number in a range
24 May, 2021
Pick the first and last items of an array
17 May, 2021
Find the root NPM package to update
17 May, 2021
Escape CSS class names
17 May, 2021
Create a big file on Linux
17 May, 2021
Compose multiple React providers
13 May, 2021
Avoid using the <b>, <i>, <s> and <u> tags
13 May, 2021
Avoid using multiple <h1> tags per page
13 May, 2021
Avoid skipping heading levels
13 May, 2021
Avoid boolean parameters
13 May, 2021
Skip questions when creating a package.json file
12 May, 2021
Quickly type color variables
12 May, 2021
List branches sorted by most recent commit date
12 May, 2021
Fold CSS declarations with region markers
12 May, 2021
Inverted corners
09 May, 2021
Concave corners
09 May, 2021
Color swatch
08 May, 2021
Apr
Specify the doctype
29 Apr, 2021
Masonry grid
28 Apr, 2021
Sort an object by its properties
20 Apr, 2021
Find the index of the minimum item of an array
20 Apr, 2021
Find the index of the maximum item of an array
20 Apr, 2021
Clear all cookies
20 Apr, 2021
Pick given properties from a JSON representation
19 Apr, 2021
Omit values of HTML boolean attributes
19 Apr, 2021
Pick a random property of an object
19 Apr, 2021
Count the occurrences of a character in a string
19 Apr, 2021
Zigzag timeline
18 Apr, 2021
Persist Console logs between page refreshes
13 Apr, 2021
Open all links in new tabs
13 Apr, 2021
Create a multiline strings
13 Apr, 2021
Check if a date occurs in the current year
13 Apr, 2021
Lazy loading images with the loading attribute
12 Apr, 2021
Highlight text with the mark element
12 Apr, 2021
Force the browsers to download new favicon
12 Apr, 2021
Create a custom emoji cursor
12 Apr, 2021
Get the total number of days in a year
10 Apr, 2021
Get all arrays of consecutive elements
10 Apr, 2021
Generate a random sign
10 Apr, 2021
Check if user scrolls to the bottom of the page
10 Apr, 2021
Check if a value is base64 encoded
10 Apr, 2021
Check if a value is base58 encoded
10 Apr, 2021
Check if a value is base32 encoded
10 Apr, 2021
Check if a value is a business identifier code
10 Apr, 2021
Check if a string is an octal number
10 Apr, 2021
Check if a string is a MongoDB ObjectId
10 Apr, 2021
Calculate the midpoint between two points
10 Apr, 2021
Transform values from a JSON representation
08 Apr, 2021
Create shapes with the clip path property
08 Apr, 2021
Convert Fahrenheit to Celsius
08 Apr, 2021
Check if a rectangle overlaps other one
08 Apr, 2021
Check if a rectangle contains other one
08 Apr, 2021
Prevent browsers from asking to translate
06 Apr, 2021
Generate an unique and increment id
05 Apr, 2021
Convert radians to degrees
05 Apr, 2021
Check if a point is inside a rectangle
05 Apr, 2021
Calculate the distance between two points
05 Apr, 2021
Copy the base64 data of an image
04 Apr, 2021
Three dimensions card
04 Apr, 2021
Layered card
04 Apr, 2021
Cast a value as an array
04 Apr, 2021
Tree diagram
03 Apr, 2021
Price tag
03 Apr, 2021
Folder structure
03 Apr, 2021
Voting
01 Apr, 2021
Mar
Locate an element with a given selector
27 Mar, 2021
Display links in the print mode
25 Mar, 2021
Avoid invisible text when loading a font
25 Mar, 2021
Add a subject to a mailto link
25 Mar, 2021
Start a simple web server on macOS
24 Mar, 2021
Smooth scrolling with pure CSS
24 Mar, 2021
Create an one-time event handler
24 Mar, 2021
Use Array.includes for multiple conditionals
23 Mar, 2021
Prevent macOS from going to sleep
22 Mar, 2021
Combine Google font requests
22 Mar, 2021
Watch a variable's value with live expressions
21 Mar, 2021
Load given characters in a Google font request
21 Mar, 2021
Early return
21 Mar, 2021
Avoid using CSS @import
21 Mar, 2021
Generate a hash of a string
21 Mar, 2021
Create a file of any size
19 Mar, 2021
View print stylesheets with Chrome DevTools
18 Mar, 2021
Capture a screenshot without shadow on macOS
18 Mar, 2021
Style index numbers of list items
17 Mar, 2021
Shorten import paths in Webpack
17 Mar, 2021
Open a package's homepage or repo
17 Mar, 2021
Center an element vertically and horizontally
17 Mar, 2021
Shorten import paths in TypeScript
16 Mar, 2021
Append leading zeros to ordered list items
16 Mar, 2021
Truncate long text
15 Mar, 2021
Move the screenshot area on macOS
15 Mar, 2021
Hide an element with Chrome DevTools
15 Mar, 2021
Style list items with special characters
14 Mar, 2021
Number headings and subheadings automatically
14 Mar, 2021
Copy screenshots to the clipboard on macOS
14 Mar, 2021
Add keyboard shortcuts
14 Mar, 2021
Swap two array items
13 Mar, 2021
Create a function that accepts a single argument
13 Mar, 2021
Create an array with conditional elements
12 Mar, 2021
Keep the calculation of a magic number
11 Mar, 2021
Create a polyfill
10 Mar, 2021
Run the last command as the root user
07 Mar, 2021
Checkout the previous branch
07 Mar, 2021
Remove duplicate values in an array
07 Mar, 2021
Get indices of a value in an array
07 Mar, 2021
Toggle hidden files on macOS
06 Mar, 2021
Shorten codes with the comma operator
06 Mar, 2021
Quick query elements in the Console
06 Mar, 2021
Pure collapsible element
06 Mar, 2021
Log the full object in NodeJS
06 Mar, 2021
Copy the full path of a file on macOS
06 Mar, 2021
Always put the footer at the bottom
06 Mar, 2021
Add a line break between inline elements
05 Mar, 2021
Write CSS rules for Firefox only
04 Mar, 2021
Show the first letter only
04 Mar, 2021
Do not use submit to name a submit button
04 Mar, 2021
Access the selected node in the Console
04 Mar, 2021
Use CSS fallback properties
03 Mar, 2021
Reuse the current color
03 Mar, 2021
Pass an array as function arguments
03 Mar, 2021
Format a number as a currency string
03 Mar, 2021
Find scrollable elements
03 Mar, 2021
Create a line-on-sides heading
03 Mar, 2021
Make a table with equal column widths
02 Mar, 2021
Prevent a string from being escaped
01 Mar, 2021
Inspect an element shown on hover
01 Mar, 2021
Filter file types of a file input
01 Mar, 2021
Create a download link
01 Mar, 2021
Accept any numbers of parameters
01 Mar, 2021
Feb
Ignore items from array destructuring
28 Feb, 2021
Use short-circuits conditionals
27 Feb, 2021
Pretty format JSON
27 Feb, 2021
Log an array to the Console
27 Feb, 2021
Log a value to the Console
27 Feb, 2021
Get the current timestamp
27 Feb, 2021
Format a list
27 Feb, 2021
Return an object in an arrow function quickly
25 Feb, 2021
Manage multiple boolean flags
25 Feb, 2021
Log a variable in an arrow function
25 Feb, 2021
Create an object with dynamic keys
25 Feb, 2021
Get the timezone string
25 Feb, 2021
Get the last date in the month of a date
25 Feb, 2021
Get the first date in the month of a date
25 Feb, 2021
Get the current quarter of a date
25 Feb, 2021
Get all subsets of an array
25 Feb, 2021
Check if a flat array has duplicate values
25 Feb, 2021
Check if a date is a weekend
25 Feb, 2021
Check if a date is a weekday
25 Feb, 2021
Use negative nth-child and nth-last-child
24 Feb, 2021
Show a placeholder for an empty list
24 Feb, 2021
Set content for an empty link
24 Feb, 2021
Separate list items
24 Feb, 2021
Remove the border from the last navigation item
24 Feb, 2021
Enforce required parameters
24 Feb, 2021
Create a descending list of numbered items
24 Feb, 2021
Conditional logging in the Console
24 Feb, 2021
Use underscores to represent a number
23 Feb, 2021
Use the wbr tags to represent path
23 Feb, 2021
Use template literal to concatenate strings
23 Feb, 2021
Use an underscore to name unused argument
23 Feb, 2021
Trim the spaces before parsing a number
23 Feb, 2021
Track the focused element with Chrome DevTools
23 Feb, 2021
Swap two variables
23 Feb, 2021
Style broken images
23 Feb, 2021
Override the behavior of instanceof
23 Feb, 2021
Get rid of escaping quotes with template literal
23 Feb, 2021
Copy a long variable from the Console
23 Feb, 2021
Always pass the radix to parseInt
23 Feb, 2021
Add an icon to external links
23 Feb, 2021
Wrap arrow function body in parentheses
22 Feb, 2021
Remove a property from an object
22 Feb, 2021
Merge different arrays
22 Feb, 2021
Indicate img elements that miss alt attribute
22 Feb, 2021
Get characters of a string
22 Feb, 2021
Do not add custom methods to primitive objects
22 Feb, 2021
Convert string to number
22 Feb, 2021
Decapitalize a string
21 Feb, 2021
Swap case of characters in a string
20 Feb, 2021
Get all n-th items of an array
20 Feb, 2021
Convert 3 digits color to 6 digits color
20 Feb, 2021
Add AM PM suffix to an hour
20 Feb, 2021
Serialize form data
01 Feb, 2021
Convert URL parameters to object
01 Feb, 2021
Jan
Get random items of an array
16 Jan, 2021
Get a random item and remove it from an array
16 Jan, 2021
Sort an array of items by given key
13 Jan, 2021
Find the minimum item of an array by given key
13 Jan, 2021
Find the maximum item of an array by given key
13 Jan, 2021
Get type of a variable in string
12 Jan, 2021
Immutably rename object keys
11 Jan, 2021
Newsletter 🔔
If you're into front-end technologies and you want to see more of the content I'm creating, then you might want to consider subscribing to my newsletter.
By subscribing, you'll be the first to know about new articles, products, and exclusive promotions.
Don't worry, I won't spam you. And if you ever change your mind, you can unsubscribe at any time.
Phước Nguyễn