- Official docs from Redis https://redis.io/commands
- Nodejs Redis client https://github.com/redis/ioredis
If Redis is running on the same machine, it will connect to the default Redis server localhost
on port 6379
.
<artifacts_info> | |
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
# Good artifacts are... | |
- Substantial content (>15 lines) | |
- Content that the user is likely to modify, iterate on, or take ownership of | |
- Self-contained, complex content that can be understood on its own, without context from the conversation | |
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
- Content likely to be referenced or reused multiple times |
If Redis is running on the same machine, it will connect to the default Redis server localhost
on port 6379
.
import { useState, useEffect } from 'react'; | |
function ErrorBoundary({ fallback, children }) { | |
const [error, setError] = useState(null); | |
useEffect(() => { | |
if (error) { | |
// log the error or send it to a server | |
console.error(error); | |
} |
The fnm still does not support -reinstall-packages-from
like nvm, so I wrote this script for me while waiting.
#!/bin/sh
# Remember to alias fnm='fnm2' for convinient
# TODO: How to make the (which fmn) work here instead of hard coded path?
/opt/homebrew/bin/fnm $*
Still don't know why I have to do this once in a while
Error message:
# Access denied.
# fatal: Could not read from remote repository.
# Please make sure you have the correct access rights
# and the repository exists.
#!/bin/bash | |
# Copy this file into .git/hooks/prepare-commit-msg file | |
# Usage: Your branch must follow the name convention: `CODE-123-Lorem-ipsum-telnet` | |
# This hook will try to extract the `CODE-123` and add it into your commit message. | |
# For example, `git commit -m "fix something"` will create a commit message content: | |
# `CODE-123 fix something` | |
COMMIT_MSG_FILE=$1 |
Host sangdth-github | |
HostName github.com | |
User sangdth | |
PreferredAuthentications publickey | |
IdentityFile /path/to/.ssh/id_ed25519_github | |
UseKeychain yes | |
AddKeysToAgent yes |
master
.master
. Enjoy productivity!CODE-123-Descriptive-task-name-here
- Select the text. | |
- Press `S` then things you want, like `]` or `)` | |
- Profit! | |
https://github.com/tpope/vim-surround/issues/220 |