See the new site: https://postgresisenough.dev
| <template> | |
| <h1>List items</h1> | |
| <ul> | |
| <li v-for="item in items" :key="item.id"> | |
| {{ item.name }} | |
| </li> | |
| </ul> | |
| <button @click="addItem">Add item</button> | |
| </template> |
| import type {CodegenConfig} from '@graphql-codegen/cli'; | |
| const config: CodegenConfig = { | |
| config: { | |
| namingConvention: { | |
| // Ensure enum values are the same as their name, not a number or camelCased | |
| enumValues: 'keep', | |
| }, | |
| }, | |
| schema: ['src/**/schema.graphql'], |
see https://pnpm.io/installation
$ pnpm --versioncorepack will NOT be distributed with Node.js v25>= https://nodejs.org/docs/latest-v24.x/api/corepack.html
- use Auth0 for logins
- retrieve a Fauna instance secret for the user (see Fauna's ABAC tutorial)
- have the user’s device talk directly to Fauna's native graphql endpoint using their secret for authorization.
At the very least, we need two pieces of functionality:
- Create a user document in Fauna to represent each Auth0 user.
- Exchange an Auth0 JWT for a FaunaDB user secret.
Occasionally I get asked what resources I would recommend for someone who wants to get into working out or to start exercising. The following is a list of resources that I have found useful over the years.
The first resource I would recommend is the book Core Performance. It is probably the best introductory book that you can read on exercising. Its not a book about picking up weights. That is only one of the seven parts of this book. It covers movement prep (dynamic stretching), prehab, physio-ball routines (stability), elasticity, strength, cardio and regeneration. All of these topics are perfect for anyone getting into exercising or anyone who wants to prevent injuries. The book has beginner, intermediate and advanced routines in the back. TIP: download the app FitNotes. It might take a little bit of time to add your routines but it is the best app a
| export const toCamelCase = (e) => { | |
| return e.replace(/_([a-z])/g, (g) => g[1].toUpperCase()); | |
| }; | |
| export const toSnakeCase = (e) => { | |
| return e.match(/([A-Z])/g).reduce( | |
| (str, c) => str.replace(new RegExp(c), '_' + c.toLowerCase()), | |
| e | |
| ) | |
| .substring((e.slice(0, 1).match(/([A-Z])/g)) ? 1 : 0); |