- Pick an image with a 10:7 aspect ratio.
- Resize it to the Mega Drive's native resolution.
- Quantize the image to meet Mega Drive hardware limitations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #region Ensure CharacterData has the exact same keys as characterProperties | |
type TypeCheck<T extends true> = T; | |
// KeyDifference will be `never` when CharacterData's keys exactly match those | |
// of characterPropertiesMap, otherwise it will include the mismatching keys | |
type KeyDifference = Exclude< | |
keyof typeof characterPropertiesMap | keyof CharacterData, | |
keyof typeof characterPropertiesMap & keyof CharacterData | |
>; | |
// Typescript will throw a compile error with the mismatching keys (if any) | |
export type AssertExactKeys = TypeCheck< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @type {{ event: string; [key: PropertyKey]: unknown; }} */ | |
const exampleEvent = { event: "modules_rendered", spotlight_modules: [ "ToolbarPinning", "PerformanceInterventionUI", "MobilePasswords", "129-companypayreauth", ], explore_more_modules: [ "128-company-lens", "128-product-site-search-shortcut", "127-side-panel-pinning", "125-search-box-suggestions", "125-safety-check", "123-generative-theming", ], }; | |
console.debug( `%c DataLayer %c ${exampleEvent.event} `, "background: blue; color: white;", "background: lightgrey; color: black;", exampleEvent ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts an Error object into a plain object with all its properties. | |
* It includes non-enumerable properties like "message", "name", and "stack". | |
* | |
* @param {Error} error - The Error object to convert. | |
* @returns {Object} A plain object containing the properties of the Error. | |
*/ | |
const convertErrorToPlainObject = (error) => | |
Object.fromEntries( | |
Object.getOwnPropertyNames(error).map((propertyName) => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /Library/Audio/Plug-Ins/Components -name "*.component" -exec sh -c 'for f; do n=$(plutil -extract AudioComponents.0.name raw -o - "$f/Contents/Info.plist" 2>/dev/null) && n=$(echo "$n" | sed "s/^\"//; s/\"$//; s/.*: //") || n=$(plutil -extract CFBundleName raw -o - "$f/Contents/Info.plist" 2>/dev/null) && n=$(echo "$n" | sed "s/^\"//; s/\"$//") || n=$(basename "$f" .component); echo "$n"; done' sh {} + | sort -u -f | tr '\n' ',' | sed 's/,/, /g; s/, $/\n/' | pbcopy && pbpaste |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Must have git, homebrew, and xcode to install | |
# Check for git | |
if ! command -v git &> /dev/null | |
then | |
echo "git could not be found, please install git before proceeding." | |
exit | |
fi |
- Default style: Font size of 16px, font weight of 400 (normal), line height of 1.5, and a letter spacing of normal.
- Default style: Font size of 24px for
h2
and 20px forh3
, font weight of 600 (semi-bold), line height of 1.4, and a letter spacing of normal.
- Default style: Font size of 32px, font weight of 700 (bold), line height of 1.2, and a letter spacing of normal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Automatically prepend the JIRA issue-key to the commit message | |
readonly COMMIT_MESSAGE_PATH="$1" | |
readonly COMMIT_TYPE="$2" | |
readonly GIT_BRANCH=$(git branch --show-current) | |
# Pick the last issue key in a branch name or return empty result. | |
# - "feature/AB-123-is-not/the/AB-987-last" will yield "AB-987" | |
# - "main" will yield "" | |
readonly ISSUE_KEY=$(node -e 'console.log(process.argv.pop().split("/").reduce(((e,o)=>(o=/^[A-Z]{2,}-\d+/.exec(o)?.pop())?o:e),""))' "${GIT_BRANCH}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
function sleep(ms, msg) { | |
console.log(`Executing '${msg}'`); | |
return new Promise((resolve) => | |
setTimeout(() => { | |
console.log(`Resolving '${msg}'`); | |
resolve(msg); | |
}, ms) | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
!/.gitkeep |
NewerOlder