Skip to content

Instantly share code, notes, and snippets.

View Blithe-Chiang's full-sized avatar
💭
I may be slow to respond.

Blithe-Chiang

💭
I may be slow to respond.
  • Fujian, China
View GitHub Profile
@Blithe-Chiang
Blithe-Chiang / bashrc
Created June 26, 2025 09:49
简洁的bashrc配置
# Enable the subsequent settings only in interactive sessions
case $- in
*i*) ;;
*) return;;
esac
eval "$(fnm env --use-on-cd)"
export NODE_TLS_REJECT_UNAUTHORIZED=0
export JAVA_HOME="C:\\Program Files\\Android\\Android Studio\\jbr"
import fs from "node:fs";
import path from "node:path";
import { parse } from "@babel/parser";
import traverse from "@babel/traverse";
import { csvWrite } from "./utils.js";
// 解析文件内容为 AST
const parseFile = (code) => {
return parse(code, {
sourceType: "module",
@Blithe-Chiang
Blithe-Chiang / CFlatList.tsx
Last active September 17, 2025 08:53
CFlatList
import {useLatest, useMemoizedFn, useMount, useUnmountedRef} from 'ahooks';
import React, {forwardRef, useImperativeHandle, useRef, useState} from 'react';
import {FlatList, FlatListProps} from 'react-native';
interface CFlatListProps<ItemT> {
onFetch: (
isRefresh: boolean,
success: (data: ItemT[], pageSize: number) => void,
fail: (err: string) => void,
) => void;
@Blithe-Chiang
Blithe-Chiang / MyStore.ts
Created May 12, 2024 03:02
zustand简单封装
// deps: zustand, immer
import { create } from "zustand";
import { immer } from "zustand/middleware/immer";
export type TStore<T> = ReturnType<typeof createStore<T>>
export function createStore<T>(initState: T) {
return create<T>()(
immer((set) => ({
@Blithe-Chiang
Blithe-Chiang / docker-compose.yml
Last active April 27, 2021 12:32
docker-compose 网络测试
version: "3.3"
# 启动两个服务
services:
box1:
# 设置容器名字
container_name: box1
image: shooan/hello
# 连接到new网络
networks: