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
  • 15:47 (UTC +08:00)
View GitHub Profile
@Blithe-Chiang
Blithe-Chiang / CFlatList.tsx
Last active June 17, 2024 02:53
CFlatList
import { useMemoizedFn, useMount, useUnmountedRef } from "ahooks";
import React, { 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 / ai.list
Last active May 21, 2024 03:33
上网需求
// 关于 OpenAI, ChatGPT 的
DOMAIN-SUFFIX,ai.com
DOMAIN-SUFFIX,auth0.openai.com
DOMAIN-SUFFIX,chat.openai.com
DOMAIN-SUFFIX,chat.openai.com.cdn.cloudflare.net
DOMAIN-SUFFIX,challenges.cloudflare.com
DOMAIN-SUFFIX,featuregates.org
DOMAIN-SUFFIX,identrust.com
DOMAIN-SUFFIX,intercom.io
DOMAIN-SUFFIX,invoice.stripe.com
@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: