Skip to content

Instantly share code, notes, and snippets.

@hdodov
hdodov / .zshrc
Last active September 13, 2023 09:15
# Enable git autocompletions
autoload -Uz compinit && compinit
# Change terminal prompt to "$directory ($branch)"
autoload -Uz vcs_info
zstyle ':vcs_info:git:*' formats ' (%b)'
precmd () { vcs_info }
setopt prompt_subst
PS1='%F{yellow}%1~%f%F{cyan}$vcs_info_msg_0_%f $ '
@hdodov
hdodov / _repl.ts
Last active February 20, 2023 15:17
Payload CMS playground script for running code in a REPL fashion.
// NOTE: This file must be in the `src` folder, i.e. `src/repl.ts`.
/**
* Playground script that can be used in a REPL fashion.
* Just `npm run repl` and Payload will run in a minimal, local API mode.
* @see https://payloadcms.com/docs/local-api/overview#local-api
*/
import payload from "payload";
import dotenv from "dotenv";