Type | Emoji | code |
---|---|---|
feat | ✨ | :sparkles: |
fix | 🐛 | :bug: |
docs | 📚 | :books: |
style | 💎 | :gem: |
refactor | 🔨 | :hammer: |
perf | 🚀 | :rocket: |
test | 🚨 | :rotating_light: |
build | 📦 | :package: |
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
# Rename Git branch locally and remotely | |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
<p class="bg-gradient-to-r from-purple-400 to-green-600 bg-clip-text text-8xl font-extrabold text-transparent">Text Goes Here</p> |
Make sure everything is pushed up to your remote repository (GitHub):
git checkout main
Overwrite "main" with "better_branch":
git reset --hard better_branch
Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
Search for message in the list:
a901eda HEAD@{18}: commit: <last commit message>
Now you have two options, either checkout revision or HEAD
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
// zod schema | |
z.object({ | |
// valid if string or: | |
optional: z.string().optional(), // field not provided, or explicitly `undefined` | |
nullable: z.string().nullable(), // field explicitly `null` | |
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined` | |
}); | |
// type | |
{ |
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
const createUserRequestSchema = z.object({ | |
name: z.string(), | |
email: z.string().email(), | |
}) | |
type CreateUserRequestBody = z.infer<typeof createUserRequestSchema> | |
export default async function handler( | |
req: NextApiRequest, | |
res: NextApiResponse |
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
version: "3.9" | |
name: myprojectname-mysql | |
services: | |
# This is your local MySQL database instance | |
mysql-db: | |
image: mysql | |
restart: always | |
environment: |
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
import { drizzle } from "drizzle-orm/postgres-js"; | |
import postgres from "postgres"; | |
import { env } from "~/env.js"; | |
import * as schema from "./schema"; | |
import { type PostgresJsDatabase } from "drizzle-orm/postgres-js"; | |
// Fix for "sorry, too many clients already" | |
declare global { |
OlderNewer