Skip to content

Instantly share code, notes, and snippets.

View caoer's full-sized avatar
🎯
Focusing as always

Zitao Xiong caoer

🎯
Focusing as always
View GitHub Profile

Directory structure: └── microsoft-TypeChat/ ├── SUPPORT.md ├── typescript/ │ ├── examples/ │ │ ├── crossword/ │ │ │ └── README.md │ │ ├── coffeeShop-zod/ │ │ │ └── README.md │ │ ├── sentiment-zod/

Directory structure: └── modelcontextprotocol-docs/ ├── docs/ │ ├── tools/ │ │ ├── debugging.mdx │ │ └── inspector.mdx │ └── concepts/ │ ├── roots.mdx │ ├── resources.mdx │ ├── architecture.mdx

@caoer
caoer / uv.md
Created December 25, 2024 19:11

Directory structure: └── docs/ ├── reference/ │ ├── build_failures.md │ ├── settings.md │ ├── index.md │ ├── resolver-internals.md │ ├── benchmarks.md │ ├── policies/ │ │ ├── license.md

├── README.md └── docs ├── at-glance.md ├── blog.md ├── blog ├── elysia-02.md ├── elysia-03.md ├── elysia-04.md ├── elysia-05.md ├── elysia-06.md

@caoer
caoer / contracts...artifacts...build-info...c041de928c6ecfbdf734b90e8444376f.json
Created October 23, 2022 19:14
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "c041de928c6ecfbdf734b90e8444376f",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.7",
"solcLongVersion": "0.8.7+commit.e28d00a7",
"input": {
"language": "Solidity",
"sources": {
"contracts/1_Storage.sol": {
for file in ./* ; do mv "$file" "$(echo $file| sed -e 's/\([A-Z]\)/\L\1/g' | sed -e 's/ /_/g')" ; done
function useAsyncStorage(key: string, initialValue: string | null = null) {
const [storageItem, setStorageItem] = useState<string | null>(initialValue);
const updateStorageItem = useCallback(
function (data: string) {
void AsyncStorage.setItem(key, data).catch(e =>
console.log(`updateStorageItem error: ${e}`),
);
setStorageItem(data);
return data;
### Keybase proof
I hereby claim:
* I am caoer on github.
* I am zitao (https://keybase.io/zitao) on keybase.
* I have a public key ASCMYcEZc4il0nlJc4NwsxEU78K4QM8EPwr9UPx3UMK0pQo
To claim this, I am signing this object:
@caoer
caoer / postgres_queries_and_commands.sql
Created May 11, 2021 10:18 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@caoer
caoer / github-utils.zsh
Created June 19, 2020 08:14
github-utils.zsh
github_current_repo() {
local REPO=`git remote -v show | awk 'NR==1 {print $2}' | sed 's/[email protected]://' | sed 's/\.git$//'`
echo $REPO
}
github_deployment_create() {
REPO=`github_current_repo`
if [ -z "${2-}" ]
then