Skip to content

Instantly share code, notes, and snippets.

View lewxdev's full-sized avatar

J. Lewis lewxdev

View GitHub Profile
{
"$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": "inquiries.lewis@gmail.com",
@lewxdev
lewxdev / deploy-github-pages-vite-react.md
Created February 1, 2023 16:24
commands and 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

@lewxdev
lewxdev / shorthand-formatted-regex.js
Created November 30, 2022 01:34
Provides a utility function "$p()" that creates regular expression patterns from shorthand strings
/**
* 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 }[]}
*/