A small inspect
function to log events to the browser console, when you expand a group you see a log of the full event object.
These are my eggs. I like this recipe because it's delicious, doesn't take too much time to make, and goes well with other meals in my life.
All instructions are negotiable, adjust based on vibes.
Start by slicing up an onion. I like using a milder tasting onion, or a banana shallot. I like slices so I can taste it in the final product, but feel free to chop it finer if you'd like.
In a bowl, make the 'sauce'. A teaspoon each of gochugang paste, soy sauce, sesame oil, a couple of pinches of brown sugar, mirin or rice vinegar (I prefer mirin because it doesn't smell as strong, but the vinegar is more 'traditional'). Also add a teaspoon of garlic paste, and a teaspoon of ginger paste.
import fs from 'node:fs/promises' | |
import path from 'node:path' | |
/** Fetches the types for a locally installed NPM package. */ | |
export async function getTypeDeclarations(packageName) { | |
const [parentPackage, submodule] = packageName.split('/') | |
const parentPackagePath = path.resolve( | |
process.cwd(), | |
'node_modules', | |
parentPackage, |
import { DateTime } from 'luxon'; | |
import { Machine, assign } from 'xstate'; | |
type Maybe<T> = T | null | undefined; | |
export type AnyCodeReviewActivity = | |
| CodeReviewCreatedActivity | |
| CodeReviewRequestedActivity | |
| CodeReviewMergedActivity | |
| CodeReviewDiscussedActivity |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
Copy this to roam/js page, including the "{{[[roam/js]]}}" node: | |
- {{[[roam/js]]}} | |
- ```javascript | |
/* | |
* Roam template PoC by @ViktorTabori | |
* 0.1alpha | |
* | |
* How to install it: | |
* - go to `roam/js` page` |
An official formula for dynamodb-local
existed, but was removed since dynamodb-local is not open source and stopped having versions.
Now its available either through a Cask, or by installing it as a formula from an unofficial tap (third party repo).
When installed as a cask dynamodb-local cannot be exposed as a service, so here we are installing it as a formula. It has been forked from rjcoelho/homebrew-boneyard and updated to be a head-only formula, to avoid checksum erros on new versions. It is available at dgoguerra/homebrew-boneyard.
# dynamodb-local depends on Java 6+
import React, { Component } from "react" | |
import { Machine } from "xstate" | |
import * as PropTypes from "prop-types" | |
class FiniteMachine extends Component { | |
machine = Machine(this.props.chart) | |
state = { | |
data: this.props.reducer(undefined, { type: "@init" }), | |
machineState: this.machine.getInitialState() |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |