Skip to main content
whitep4nth3r logo
Posts tagged

Snippets

  1. 12 May 2024

    How to prevent Prettier putting a full stop on a new line after a link

    Ugh, what a minefield.

    Snippets 3 min read →
  2. 22 Nov 2022

    A responsive striped CSS gradient inspired by 80s VHS tapes

    Create a responsive, horizontal-striped CSS gradient inspired by 80s VHS tapes using CSS custom properties and a linear gradient.

    CSS 3 min read →
  3. 5 Sep 2022

    Rewrite your git history in 4 friendly commands

    Did you make a series of unfortunate commits? Learn how to clean up your nonsense.

    Git 4 min read →
  4. 29 May 2022

    Level up your link previews in Slack

    Add extra metadata to the head tag in your web pages to show richer previews in Slack when your link is unfurled.

    Tutorials 3 min read →
  5. 11 May 2022

    Light and dark mode in just 14 lines of CSS

    Combine two CSS custom properties with a media query to get set up with light and dark mode in seconds.

    CSS 3 min read →
  6. 21 Mar 2022

    How to format dates for RSS feeds (RFC-822)

    Here's a selection of links, guidance and code snippets to help you format dates for RSS feeds (RFC-822).

    Tutorials 2 min read →
  7. 7 Mar 2022

    How to delete all merged git branches with one terminal command

    Automate your git cleanup! Here's a shell function to add to your bashrc/zshrc file to delete all merged git branches in one command.

    Git 1 min read →
  8. 11 Feb 2022

    How to build an HTML-only accordion — no JavaScript required!

    You don't need JavaScript to build accordions! Use HTML only and just four lines of code.

    Tutorials 2 min read →
  9. 11 Jul 2021

    How to avoid using relative path imports in Next.js

    Say goodbye to ../really/long/and/silly/paths/to/components in your Next.js application and define absolute imports with a jsconfig.json file.

    Snippets 1 min read →
  10. 8 Jul 2021

    How I set up my new Next.js projects with a handy bash script

    After I create a new Next.js application I run this bash script to prepare my app for development — just the way I like it. Give it a try!

    Snippets 1 min read →