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
rm -rf prisma/migrations | |
echo 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;' | npx prisma db execute --stdin | |
npx prisma migrate dev --name init |
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 url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500&display=swap"); | |
$background: white; | |
$color: #31405b; | |
$fontFamily: "IBM Plex Sans", sans-serif; | |
$red: #e63946; | |
$orange: #f4a261; | |
$yellow: #f1fa3b; | |
$green: #2a9d8f; | |
$blue: #606ef6; |
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 { describe, test, expect } from "vitest"; | |
import { CreateLoop } from "./CreateLoop"; | |
/** | |
* TODO: | |
* - add a before all hook | |
* - add a after all hook | |
* - add a before state set hook | |
* - add a after state set hook | |
* - abiity to preprocess arguments |
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 { | |
AnyEventObject, | |
BaseActionObject, | |
StateNodeConfig, | |
TransitionConfig, | |
TransitionsConfig, | |
createMachine, | |
interpret, | |
} from "xstate"; |
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
// From https://twitter.com/diegohaz/status/1560525455383461888 | |
// by Diego Haz @diegohaz | |
// Wait for all queueMicrotask() callbacks | |
export function flushMicrotasks() { | |
return act(() => Promise.resolve()); | |
} | |
// Wait for all requestAnimationFrame() callbacks | |
export function nextFrame() { |
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
function HelloWorld() { | |
console.log("Hello World"); | |
} | |
export default HelloWorld; |
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 | |
const request = require("request"); | |
const cheerio = require("cheerio"); | |
const args = process.argv.slice(2); | |
const search = args[0]; | |
if (!search) throw new Error("Must pass search term"); |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// From https://stackoverflow.com/questions/48011353/how-to-unwrap-type-of-a-promise/57364353#57364353 | |
type Await<T> = T extends PromiseLike<infer U> ? Await<U> : T |
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
/* | |
Before | |
html { | |
font-size: 16px; | |
} | |
@media screen and (min-width: 320px) { | |
html { | |
font-size: calc(16px + 6 * ((100vw - 320px) / 680)); | |
} | |
} |
NewerOlder