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
| // TODO: make `pages` optional and measure the div when unspecified, this will | |
| // allow more normal document flow and make it easier to do both mobile and | |
| // desktop. | |
| import { | |
| createContext, | |
| useCallback, | |
| useContext, | |
| useEffect, | |
| useMemo, | |
| useRef, |
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
| import type { LoaderFunction, ActionFunction } from "remix"; | |
| import { useLoaderData, useFetcher } from "remix"; | |
| import invariant from "tiny-invariant"; | |
| import cuid from "cuid"; | |
| import React from "react"; | |
| import type { Task, User } from "@prisma/client"; | |
| import { requireAuthSession } from "~/util/magic-auth"; | |
| import { ensureUserAccount } from "~/util/account"; | |
| import { placeCaretAtEnd } from "~/components/range"; | |
| import { getBacklog } from "~/models/backlog"; |
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
| //////////////////////////////////////////////////////////////////////////////// | |
| // Create a directory called "pages" next to | |
| // this file, put markdown files in there, and | |
| // then run: | |
| // | |
| // ``` | |
| // $ node build.mjs | |
| // ``` | |
| // | |
| // Then deploy the "build" directory somewhere. |
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
| const Discord = require('discord.js') | |
| // your bot token | |
| const token = 'NzM4MDk2NjA4NDQwNDgzODcw.XyG8CA.RbwIBFnAbrRDYOlTdLYgG_T4CMk' | |
| const discordUsername = 'example#1234' | |
| const roleToAdd = 'Cool Person' | |
| const guildName = 'Your Guild Name' | |
| function deferred() { | |
| let resolve, reject |
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
| const express = require('express'); | |
| const app = express(); | |
| // Application | |
| app.get('/', function(req, res) { | |
| if (process.env.NODE_ENV === 'development') { | |
| for (var key in require.cache) { | |
| delete require.cache[key]; | |
| } | |
| } |
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
| { | |
| "name": "javascript-development-environment", | |
| "version": "1.0.0", | |
| "description": "JavaScript development environment Pluralsight course by Cory House", | |
| "scripts": { | |
| }, | |
| "author": "Cory House", | |
| "license": "MIT", | |
| "dependencies": { | |
| "whatwg-fetch": "1.0.0" |