Snippets

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

fibonacci_sequence.py

Generate the Fibonacci Sequence for the length given

Code

pascals_triangle.py

Generate Pascal's Triangle for the number of rows given

Code

db-relationships.md

Relationships and foreign keys in SQL databases

Code

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-downloads-api.md

npm REST API endpoint for package downloads

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

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

404.js

Next.js Custom 404 page

Code

screen-media-queries.css

CSS screen media queries

Code

react-useeffect.md

React useEffect cheat sheet

Code