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
@caoer
caoer / install.sh
Created October 22, 2025 23:54
ccc-statusd installation script
#!/bin/bash
# ccc-statusd installation script
# Usage: curl -fsSL https://raw.githubusercontent.com/caoer/ccc-statusd/main/install.sh | bash
set -e
REPO="caoer/ccc-statusd"
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
VERSION="${VERSION:-latest}"
@caoer
caoer / dev.to.yaml
Created October 19, 2025 06:25 — forked from cor-bee/dev.to.yaml
Overdocumented Instant View Template for dev.to (https://instantview.telegram.org/contest/dev.to/template28/)
## General info:
# Function starts with @
# Variable starts with $
# Return of the most recently run function made by $@
# Key comments marked with ##
## Version of IV must be set first
~version: "2.1"
# Telegram doesn't support JW Player which is used in videoheaders

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": {
"content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.7;\n\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';\n\ncontract Ownable {\n address private _owner;\n\n constructor() {\n _owner = msg.sender;\n }\n\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier only_owner() {\n require(check_is_owner(), 'Error: Unauthorized access');\n _;\n }\n\n function check_is_owner() public view returns (bool) {\n return msg.sender == _owner;\n }\n}\n\ncontract TokenTransfer is Ownable {\n using SafeERC20 for IERC20;\n IERC20 _token;\n\n constructor(address token) {\n _token = IERC20(token);\n }\n\n event SettleInfoEvent(string settle);\n\
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: