- [1] Next-generation Node.js and TypeScript ORM.
- [1] Get started in minutes with a new or existing database.
- [1] Use full type safety and automated workflows to ship schema changes and write queries with less work.
-
- Prisma Client is a query builder that composes queries the way you think and is auto-generated from the Prisma schema with types tailored to your app.
-
- Prisma Migrate automatically generates SQL database migrations, that are fully customizable, enabling you to make changes to the database without generating migration files.
- [2][3] Prisma makes SQL so easy you'll barely notice you're using it.
- [4] Prisma is a database toolkit that covers the daily workflows of application developers that interact with databases. A few examples are:
-
- querying (with Prisma Client)
-
- data modeling (in the Prisma schema)
-
- migrations (with Prisma Migrate)
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
// Modified version of component from https://craft.mxkaske.dev/post/fancy-multi-select | |
import { createContextScope, type Scope } from '@radix-ui/react-context'; | |
import * as PopperPrimitive from '@radix-ui/react-popper'; | |
import { createPopperScope } from '@radix-ui/react-popper'; | |
import { Portal as PortalPrimitive } from '@radix-ui/react-portal'; | |
import { Presence } from '@radix-ui/react-presence'; | |
import { useControllableState } from '@radix-ui/react-use-controllable-state'; | |
import { X } from 'lucide-react'; | |
import * as React from 'react'; |
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
{ | |
"$schema": "https://zed.dev/schema/themes/v0.1.0.json", | |
"name": "Vesper", | |
"author": "Rauno Freiberg", | |
"themes": [ | |
{ | |
"name": "Vesper", | |
"appearance": "dark", | |
"style": { | |
"border": "#101010", |
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 function progressBar( | |
percent: number, | |
width: number, | |
charPalette: string[] = ["░", "▓", "█"] | |
) { | |
// figure out how much % each character will represent considering 100% = width | |
const charPercentValue = 100 / width; | |
// figure out how much of a % each character in the palette represents | |
// palette[0] will always mean 0% of the charPercentValue, |
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
// Plop these into your VSCode settings.json, | |
// can easily acces from the command palette | |
// then typing "Preferences: Open User Settings (JSON)" | |
"workbench.colorTheme": "Vesper", | |
// Overrides vesper theme start | |
"workbench.colorCustomizations": { | |
"editorGutter.addedBackground": "#A0A0A0", | |
"editorGutter.deletedBackground": "#A0A0A0", | |
"editorGutter.modifiedBackground": "#A0A0A0" |
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
/** | |
* Generates tailwindcss-animate compatible animation utilities from the keyframes defined in theme.keyframes. | |
* | |
* @see [tailwindcss-animate](https://github.com/jamiebuilds/tailwindcss-animate) | |
*/ | |
const generateAnimationUtilitiesFromKeyframes = plugin(({ addUtilities, theme }) => { | |
function generateAnimationUtilities(keyframes) { | |
const animationUtilities = {}; | |
Object.entries(keyframes).forEach(([animationName, animationKeyframes]) => { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BackgroundColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS | |
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGmCwwXHR4lVSRudWxs1Q0ODxAR | |
EhMUFRZcTlNDb21wb25lbnRzVU5TUkdCXE5TQ29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29s | |
b3JTcGFjZVYkY2xhc3NPECswLjA2Mjc0NTEwMTc1IDAuMDYyNzQ1MTAxNzUgMC4wNjI3 |
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
// Replace “.the-fixed-child” for a CSS selector | |
// that matches the fixed-position element: | |
const selector = '.the-fixed-child'; | |
function findCulprits(elem) { | |
if (!elem) { | |
throw new Error( | |
'Could not find element with that selector' | |
); | |
} |
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
ttftfffttttttttttfffffffttftt1ttttttt111tttt1111111tttt1tt111tttt111111tttt1ttttttttttttttt111111111 | |
ttfttttttttttttttttfLLLftfffffffffftttt111tt11111ttffffftttt1111111111111111ttttttfttttttttt111111t1 | |
ttttttttttttttttffffLfftffffffffLLffttttttftt111ttfffffftttttttt111111ttttttffffttfffttttttt111111tt | |
ttttttttttttttttfffLfttffffffLLffffttttttttttt1tfffffffffftttttt111111tffffffffftttfffftttt11111ttt1 | |
ttttttttttttffLfttfffttfffffffffttfftttttt1t1tt11tfffffftttttt111t111111ttffffLLffttfffftt111111tttt | |
ttttttttttffLLLLfttttffLLLfttttftfLftttttttffffttttffffttttfftt11t111tt111ttfffLffttfftttttt1111tttt | |
ttttttttffLLLLLLLffttfLLffttfffftfLfttttttffttt11111ttttffffffftt1111tft11111ttffffttt11tfftt11ttttt | |
tttttttfffLLLLLLLLfftffttttffLffftfftttttft1i;;::::;iitffffffffftt111tft1tttt1ttffLfttttfffffttttttt | |
tttttttfffLLLLLLLLfttttffftffffftfttttttff1:,,,,,,,,::itfffffffft11111111ttttttttttt1tfffffffffffttt | |
tttffttffLLLLLLLLLfttfftffffffffLLLftttttt;::,:::;;;;::1tfffftfft11111ttt1ttt1tfttt11ttffffffffLfttt |
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
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
NewerOlder