-
Put the above prisma-effect-generator.ts in your root of your project.
-
Install "@prisma/generator-helper" and "@prisma/internals" as dev dependecies.
-
Add this to your schema.prisma file
generator sqlSchema {| import type { PropsWithChildren, ReactElement, ReactNode } from 'react'; | |
| import React, { Children, cloneElement, isValidElement } from 'react'; | |
| import { render } from '@testing-library/react'; | |
| function setFakeReactDispatcher<T>(action: () => T): T { | |
| /** | |
| * We use some internals from React to avoid a lot of warnings in our tests when faking | |
| * to render server components. If the structure of React changes, this function should still work, | |
| * but the tests will again print warnings. |
| // 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
| // You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
| (() => { | |
| const SHOW_SIDES = false; // color sides of DOM nodes? | |
| const COLOR_SURFACE = true; // color tops of DOM nodes? | |
| const COLOR_RANDOM = false; // randomise color? | |
| const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
| const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
| const THICKNESS = 20; // thickness of layers | |
| const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
| "use client"; | |
| import { | |
| Dialog, | |
| DialogContent, | |
| DialogTitle, | |
| DialogTrigger | |
| } from "@/components/ui/dialog"; | |
| import useDragDrop from "@/hooks/useDragDrop"; | |
| import { cn, formatBytes } from "@/lib/utils"; |
This note details the changes made to the Zen and ZMK codebase to improve the experience of e-ink displays.
You can test out below changes using your Zen config repo by modifying your config/west.yml file, following ZMK instructions:
manifest:
remotes:
- name: caksoylar| // This file assures that a Jest test file and Cypress test file exists for each component. | |
| import path from "path"; | |
| import fs from "fs"; | |
| function getFiles(filepath: string) { | |
| return fs.readdirSync(filepath).filter(function (file) { | |
| return fs.statSync(path.join(filepath, file)).isFile(); | |
| }); | |
| } |
| // Logiops (Linux driver) configuration for Logitech MX Master 3. | |
| // Includes gestures, smartshift, DPI. | |
| // Tested on logid v0.2.2-35-g1c209ed. | |
| // File location: /etc/logid.cfg | |
| devices: ({ | |
| name: "Wireless Mouse MX Master 3"; | |
| smartshift: { |
Memoization is a somewhat fraught topic in the React world, meaning that it's easy to go wrong with it, for example, by [making memo() do nothing][memo-pitfall] by passing in children to a component. The general advice is to avoid memoization until the profiler tells you to optimize, but not all use cases are general, and even in the general use case you can find tricky nuances.
Discussing this topic requires some groundwork about the technical terms, and I'm placing these in once place so that it's easy to skim and skip over:
| ``` | |
| import postcss from 'rollup-plugin-postcss'; | |
| import genericNames from 'generic-names'; | |
| // ... | |
| postcss({ | |
| extract: true, | |
| modules: { | |
| // Special scoped name generation function used to sync |