Skip to main content
whitep4nth3r logo
Posts tagged

Snippets

  1. 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 →
  2. 5 Sep 2022

    Rewrite your git history in 4 friendly commands

    Did you make a series of unfortunate commits? Learn how to rewrite the git history of a repository in 4 friendly terminal commands to clean up your nonsense.

    Web Dev 4 min read →
  3. 29 May 2022

    Level up your link previews in Slack

    Add extra metadata to the head tag in your web pages — such as reading time and author — to show richer previews in Slack when your link is unfurled.

    Tutorials 3 min read →
  4. 11 May 2022

    Light and dark mode in just 14 lines of CSS

    Want to add quick support for light mode and dark mode to your website using only CSS? Combine two CSS custom properties with a media query to get set up in seconds.

    CSS 3 min read →
  5. 21 Mar 2022

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

    The RSS feed lives on! But I've always found it difficult to Google for the correct date format required for RSS feeds (RFC-822). Here's a selection of links, guidance and code snippets for future me — and you!

    Tutorials 2 min read →
  6. 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.

    Snippets 1 min read →
  7. 11 Feb 2022

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

    You don't need JavaScript to build accordions! Here's how to harness the power of native HTML and build an accordion with just four lines of code.

    Tutorials 2 min read →
  8. 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.

    Next.js 1 min read →
  9. 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 with npx create-next-app, I run this bash script to prepare my app for development — just the way I like it. And then I tell myself to have a nice day! Give it a try!

    Next.js 1 min read →