This file contains 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
#!/usr/bin/env node | |
// With the help of https://gist.github.com/kentcdodds/bb452ffe53a5caa3600197e1d8005733 | |
// Thanks Kent C. Dodds | |
const spawnSync = require("child_process").spawnSync; | |
const styles = { | |
// got these from playing around with what I found from: | |
// https://github.com/istanbuljs/istanbuljs/blob/0f328fd0896417ccb2085f4b7888dd8e167ba3fa/packages/istanbul-lib-report/lib/file-writer.js#L84-L96 |
This file contains 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
diff --git a/node_modules/tailwindcss/lib/jit/lib/generateRules.js b/node_modules/tailwindcss/lib/jit/lib/generateRules.js | |
index 9b59423..c2f8660 100644 | |
--- a/node_modules/tailwindcss/lib/jit/lib/generateRules.js | |
+++ b/node_modules/tailwindcss/lib/jit/lib/generateRules.js | |
-function applyVariant(variant, matches, context) { | |
+function applyVariant(variant, matches, hasLibVariant, context) { | |
if (matches.length === 0) { | |
return matches; |
This file contains 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
{ | |
// Add the below code to vscode user settings.json | |
"tailwindCSS.experimental.classRegex": [ | |
["tailwind.style\\(([^)]*)\\)", "\"([^\"]*)\""], | |
["tailwind.getColor\\(([^)]*)\\)", "\"([^\"]*)\""], | |
], | |
"tailwindCSS.experimental.configFile": "your/path/to/tailwind.config.js", | |
} |
This file contains 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
{ | |
"recommendations": [ | |
"dbaeumer.vscode-eslint", | |
"esbenp.prettier-vscode", | |
"orta.vscode-jest", | |
"tlent.jest-snapshot-language-support", | |
"vespa-dev-works.jestrunit", | |
"vivaxy.vscode-conventional-commits", | |
"bradlc.vscode-tailwindcss", | |
"aaron-bond.better-comments", |
This file contains 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
echo "words" | sed '/^words/,$!d' | |
sed '/^words/,$!d' input.txt > output.txt |
This file contains 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
import { type NextFunction, type Request, type Response } from "express"; | |
export type AsyncHandler = ( | |
request: Request, | |
response: Response, | |
next: NextFunction, | |
) => Promise<void>; | |
/** | |
* Wraps an asynchronous route handler function with error handling middleware. |
This file contains 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
# https://markoskon.com/creating-font-subsets/#minimal-english-subset | |
pyftsubset\ | |
Inter.var.woff2 \ | |
--output-file="Inter.var-english.woff2" \ | |
--flavor=woff2 \ | |
--layout-features="kern,liga,clig,calt,ccmp,locl,mark,mkmk,\ | |
onum,pnum,smcp,c2sc,frac,lnum,tnum,subs,sups,\ | |
cswh,dlig,ss01,ss03,zero"\ | |
--unicodes="U+0000-00A0,U+00A2-00A9,U+00AC-00AE,U+00B0-00B7,\ | |
U+00B9-00BA,U+00BC-00BE,U+00D7,U+00F7,U+2000-206F,U+2074,U+20AC,\ |
This file contains 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
import { isNonNullable } from "isNonNullable"; | |
export type GetFinalLogoSizeProps = { width: number; height: number; maxHeight: number; maxWidth: number }; | |
export const getFinalLogoSize = ({ width, height, maxHeight, maxWidth }: GetFinalLogoSizeProps) => { | |
if (isNonNullable(maxHeight) && !isNonNullable(maxWidth)) { | |
return { | |
width: Math.floor(width * (maxHeight / height)), | |
height: maxHeight, | |
}; |
This file contains 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
import { getErrorMessage } from "./getErrorMessage.js"; | |
/** | |
* Adds additional error message to the existing error message. | |
* @param {unknown} error - The error object. | |
* @param {string} errorMessage - The additional error message to be added. | |
* @returns {string} - The updated error message. | |
*/ | |
export function addAdditionalErrorMessage( | |
error: unknown, |
This file contains 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
export type KeysOfValue<T, TCondition = string> = { | |
[K in keyof T]: T[K] extends TCondition ? K : never; | |
}[keyof T]; |