- Surface 180s (Jet ski)
- Push with back foot to release fins
- upper body shouldn't really move
- Surface 360s both TS/HS (jet ski)
- lean against the line
- sqaut to get good advance
- pull with two hands
- traveling
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 { useEffect, useRef } from "react"; | |
import { | |
Form, | |
useFetcher, | |
useLoaderData, | |
useTransition, | |
} from "remix"; | |
import { arc } from "~/arc.server"; | |
export async function loader() { |
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
// hard, buggy, incomplete, slower | |
<button | |
onClick={async () => { | |
setLoading(true); | |
let result = await updateProject({ | |
status: "active" | |
}); | |
setLoading(false); | |
setResult(result); | |
}} |
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 let action: ActionFunction = async ({ request, params }) => { | |
let session = await requireAuthSession(request); | |
await ensureUserAccount(session.get("auth")); | |
let data = Object.fromEntries(await request.formData()); | |
invariant(typeof data._action === "string", "_action should be string"); | |
switch (data._action) { | |
case Actions.CREATE_TASK: | |
case Actions.UPDATE_TASK_NAME: { |
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 { 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 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 { createServer } from "http"; | |
createServer(async (req, res) => { | |
if (req.url === "/app.js") { | |
res.setHeader("Content-Type", "application/javascript; charset=UTF-8"); | |
res.setHeader("Cache-Control", "max-age=10"); | |
res.write(`console.log("lol")`); | |
res.end(); | |
return; | |
} |
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
// root.tsx | |
import { getUserSession, requireUser, logout } from "~/session"; | |
export function loader({ request }) { | |
// use case: know if the user is logged in, no redirect to /login | |
let userSession = await getUserSession(request); | |
let isAuthenticated = userSession.has("userId"); | |
return { isAuthenticated }; | |
} |
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
type Await<T extends (...args: any) => any> = T extends ( | |
...args: any | |
) => Promise<infer U> | |
? U | |
: T extends (...args: any) => infer U | |
? U | |
: any; | |
async function load() { |
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 crypto from "crypto"; | |
import { renderToStaticMarkup } from "react-dom/server"; | |
import createMailgun from "mailgun-js"; | |
import type { ActionFunction, LoaderFunction, Session } from "remix"; | |
import { createCookieSessionStorage, json, redirect } from "remix"; | |
/******************************************************************************* | |
* Before we can do anything, we need to make sure the environment has | |
* everything we need. If anything is missing, we just prevent the app from | |
* starting up. |
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 |