Skip to content

Instantly share code, notes, and snippets.

View lewxdev's full-sized avatar
:shipit:

J. Lewis lewxdev

:shipit:
View GitHub Profile
@lewxdev
lewxdev / shorthand-formatted-regex.js
Last active July 11, 2024 18:03
a utility function `$p()` that creates regular expression patterns from shorthand
/**
* Produces an array of locale-respective formats
* @template {keyof Intl.DateTimeFormatOptions} K
* @template {(NonNullable<Intl.DateTimeFormatOptions[K]>)[]} [F=["long", "short"]]
* @param {K} key - a valid key on the `Intl.DateTimeFormatOptions` object
* @param {number} quantity - the number of units of the provided option
* @param {(index: number) => Date} callback - used for creating subsequent dates
* @param {F} formats - an optional list of formats to generate and key
* @returns {{ [format in F[number]]: string }[]}
*/
@lewxdev
lewxdev / deploy-github-pages-vite-react.md
Last active July 11, 2024 18:05
script for a static vite / react app github pages deployment

GitHub Pages deployment for a Vite / React app

⚠️ EDIT After testing this solution again, it looks like it only worked the first time. Additional research might help produce and actually viable solution

A better solution may be deployment via GitHub Actions, but I stumbled upon a working solution someone else may find helpful. It modifies the shell script found in the documentation a bit to use a workspace to support history

{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/schema.json",
"meta": {
"theme": "even"
},
"basics": {
"name": "J. Lewis",
"label": "Full-Stack Software Engineer",
"image": "https://gravatar.com/avatar/e8e17827ad4e795c363687a4ddbd599415a080d00007e5683f44c4dbb89a9be1?size=512",
"email": "[email protected]",

git commands

what I've picked up over the years about the stupid content tracker

🚽 porcelain

git clean -dfx [<path>...]