Hello
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Hey, good lookin'!
You caught me, this is a real gist, made in FancyGist, saved to GitHub!
Check out my newsletter at cassidoo.co/newsletter ❤️
Please star the repo and/or support the project on GitHub Sponsors: cassidoo/fancygist
| let array = [1, 2, 3, 4, 5]; | |
| let add = (x, y) => x + y; | |
| let sum = array.reduce(add, 0); | |
| // This will do: | |
| // 0 + 1 | |
| // 1 + 2 | |
| // 3 + 3 | |
| // 6 + 4 | |
| // 10 + 5 |
From this video!
Based on this Pen.
Caption:
So I have this page that looks empty, because all the spans are empty. But, using their data status attribute, I can add the CSS attribute function to the content property to actually render those characters on the screen.
Normally you can't select individual characters in a string with CSS, but because these are rendered this way, I can use the nth child and nth-last-child selector to hide those selected characters, and AHH
| import puppeteer from "puppeteer"; | |
| import fs from "fs/promises"; | |
| import path from "path"; | |
| import { fileURLToPath } from "url"; | |
| import getPosts from "..."; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| async function generateOGImages() { | |
| const posts = await getPosts(); |
Click the button and you'll seeeeeee:
(I generated this button with this project here, try it out!)
Check out this picture and toggle dark mode or light mode on your GitHub profile to see it change!
Let's make it so you can record a demo once in dark mode, and then convert that into light mode, in a single command!
FFmpeg is the brains behind pretty much all video editing softwares. It's a really awesome tool beyond just this use case!
You can go to their downloads page to clone the repo or go into details about how it runs, but here's some shortcuts.
| function generateLutFilter(hexColorsToExclude) { | |
| function hexToRgb(hex) { | |
| const bigint = parseInt(hex, 16); | |
| const r = (bigint >> 16) & 255; | |
| const g = (bigint >> 8) & 255; | |
| const b = bigint & 255; | |
| return { r, g, b }; | |
| } | |
| let lutFilter = "lutrgb="; |