Snippets

A collection of code snippets I often use. Imported from the GitHub Gists REST API.

full-page-bg-img.css

CSS Full-page background image

Code

flex-rows.css

CSS Flexbox with specified number of boxes in rows

Code

npm-api-downloads.md

npm REST API endpoints for package downloads stats

Code

comma-thousands-separator.js

Add comma thousands separator: https://stackoverflow.com/a/2901298

Code

fetch-api.js

JavaScript fetch() API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch

Code

center-items-flexbox.css

Center items using CSS flexbox

Code

link-new-tab.html

HTML Hyperlink that opens in new tab

Code

link-bottom-border.css

CSS Bottom-border for links

Code

custom-text-selection.css

CSS Custom text selection appearance

Code

custom-scrollbar.css

CSS Custom scrollbar

Code

darken-background-image.css

Darken background image: https://stackoverflow.com/a/23208450

Code

header-blurred-background.css

Blur background of a header: https://stackoverflow.com/a/64606048

Code

get-youtube-videos.js

Get YouTube videos of a channel

Code

get-github-gists.js

Get all GitHub Gists of a user

Code

crud-api-routes.js

CRUD with Next.js API routes or vercel/micro. https://stackoverflow.com/q/256349

Code

next-custom-404.js

Next.js Custom 404 page

Code

grouping-and-ordering.css

How to group and order CSS properties

Code

tailwind-theme.css

Tailwind CSS theme in variables

Code

screen-media-queries.css

CSS screen media queries

Code

base.css

Tailwind CSS default styles

Code

react-useeffect.md

React useEffect cheat sheet

Code