-
Use the Download button on www.cursor.com web site. It will download the
NAME.AppImagefile. -
Copy the .AppImage file to your Applications directory
cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImageUse the Download button on www.cursor.com web site. It will download the NAME.AppImage file.
Copy the .AppImage file to your Applications directory
cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage| import z from "zod"; | |
| export async function safeFetch<T>( | |
| schema: z.Schema<T>, | |
| input: RequestInfo, | |
| init?: RequestInit | |
| ): Promise<T> { | |
| const response = await fetch(input, init); | |
| if (!response.ok) { |
| import { z } from "zod"; | |
| import { zodToTs, printNode } from "zod-to-ts"; | |
| // Replace with your `openai` thing | |
| import { openai } from "../openai.server"; | |
| import endent from "endent"; | |
| function createJSONCompletion<T extends z.ZodType>({ | |
| prompt, | |
| schema_name, |
| // Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406 | |
| import { sql } from "drizzle-orm"; | |
| const clearDb = async (): Promise<void> => { | |
| const query = sql<string>`SELECT table_name | |
| FROM information_schema.tables | |
| WHERE table_schema = 'public' | |
| AND table_type = 'BASE TABLE'; | |
| `; |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).| export const ttlCache = <K extends string, V = any>({ ttl, maxSize }: { ttl: number, maxSize?: number }) => { | |
| let cache: Record<K, { value: V; expiresAt: number } | undefined> = Object.create(null); | |
| return { | |
| set: (key: K, value: V) => { | |
| const keys = Object.keys(cache) as K[]; | |
| if (maxSize && keys.length === maxSize) { | |
| delete cache[keys[0]]; | |
| } |
Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979
| import { InjectedFormikProps, withFormik } from 'formik'; | |
| import * as React from 'react'; | |
| import * as Yup from 'yup'; | |
| interface FormValues { | |
| login: string; | |
| } | |
| interface FormProps { | |
| login?: string; |
| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |