Conceptualized by Alistair Cockburn. Also known as "Ports and Adapters".
In a nutshell:
Application Driver -> Primary Adapter -> Primary Port -> Use Case -> Secondary Port -> Secondary Adapter -> External System/Side Effect
| #!/usr/bin/env bash | |
| # Installs Karabiner DriverKit, Kanata, and sets up LaunchDaemons (no disk logging) | |
| set -euo pipefail | |
| # Color variables | |
| MAGENTA='\033[35m' | |
| RESET='\033[0m' | |
| ARROW="${MAGENTA}==>${RESET}" |
| # download ubuntu-cloud image | |
| # NOTE: ubuntu-server won't properly work with cloud-init for some reason | |
| wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img | |
| # NOTE: no need for sudo because we already login as root | |
| # install image customization tool | |
| apt update -y && apt install libguestfs-tools -y | |
| # install qemu-guest-agent inside of image |
| import React, { createRef } from "react" | |
| import throttle from "lodash/throttle" | |
| // Import styled components (see the Styles section below). | |
| import { | |
| TocDiv, | |
| TocLink, | |
| TocIcon, | |
| TocTitle, | |
| TocToggleOpener, |
This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.
The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.
npx create-react-app cra-ts --template typescript| export enum MongoErrorCode { | |
| OK = 0, | |
| InternalError = 1, | |
| BadValue = 2, | |
| OBSOLETE_DuplicateKey = 3, | |
| NoSuchKey = 4, | |
| GraphContainsCycle = 5, | |
| HostUnreachable = 6,// Categories: NetworkError, RetriableError | |
| HostNotFound = 7,// Categories: NetworkError, RetriableError | |
| UnknownError = 8, |
| Add the `replication` section to the mongod.conf file: | |
| ``` | |
| $cat /usr/local/etc/mongod.conf | |
| systemLog: | |
| destination: file | |
| path: /usr/local/var/log/mongodb/mongo.log | |
| logAppend: true | |
| storage: | |
| engine: mmapv1 |