Skip to content

Instantly share code, notes, and snippets.

View nmnmcc's full-sized avatar
😄

Yinhao Huang nmnmcc

😄
  • Zhuhai College of Science and Technology
View GitHub Profile

STOP!本文将完全颠覆你的思维。在阅读本文之前,请你先查看 Effect 源代码了解最新的 Effect 模块,不要将 Effect 视作一个普通的库,实际上 Effect 是一个先进的力求涵盖一切的库,在解决问题时先在 Effect 寻找可能的现成的解决方案。

工作流程

在本项目中,先用类型定义业务需要什么,再编排业务如何完成,最后提供具体实现并运行。 请先按这个顺序重新理解开发任务,再开始写代码。

使用 TypeScript 和 Effect 4,以业务用例为交付单位。类型优先决定契约,控制反转决定依赖方向。 类型贯穿成功结果、预期失败、服务需求和装配过程;业务代码声明所需能力,外部装配负责提供这些能力的实现。

一、先改变开发的起点

@nmnmcc
nmnmcc / README.md
Last active July 10, 2026 16:29
eSIM Access Postman 文档转换为 OpenAPI 3.0.3 JSON

eSIM Access Postman 文档转 OpenAPI JSON

源文档:https://docs.esimaccess.com/

运行环境:Node.js 18+

npm install postman-to-openapi js-yaml
node convert.cjs esimaccess.openapi.json
@nmnmcc
nmnmcc / AGENTS.md
Created July 4, 2026 06:06
AGENTS.md

AGENTS.md

This file is the operating guide for AI coding agents and human maintainers working in this repository.

Its purpose is not to make the agent obedient to arbitrary style preferences. Its purpose is to preserve project quality as the codebase grows by making local truth, architecture boundaries, verification, and feedback loops explicit.

Core Principle

Do not rely on model memory, taste, or one-shot intuition.

@nmnmcc
nmnmcc / setup.sh
Last active June 20, 2026 06:20
Claude Code Cloud | Nix + Devenv
#!/usr/bin/env bash
set -euo pipefail
export USER=root
export PATH="/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"
# Nix
curl -fsSL -L https://install.determinate.systems/nix -o /tmp/nix-install.sh
sh /tmp/nix-install.sh install linux --no-confirm --init none
echo "source ~/.nix-profile/etc/profile.d/nix.sh" >> ~/.bashrc
@nmnmcc
nmnmcc / alacritty.toml
Last active April 16, 2026 15:39
Alacritty config
[general]
import = ["~/.config/alacritty/themes/nmnmcc.toml"]
[font]
normal = { family = "IBM Plex Mono", style = "Regular" }
[window]
padding = { x = 4, y = 4 }
opacity = 0.8
@nmnmcc
nmnmcc / gqlgen.schema.json
Created November 3, 2025 08:59
gqlgen Configuration Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/99designs/gqlgen/gqlgen.schema.json",
"title": "gqlgen Configuration Schema",
"description": "JSON Schema for gqlgen.yml configuration files",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema URI reference",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nmnmcc
nmnmcc / easynet.go
Created September 26, 2025 10:17
For ZCST Internal Use
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"log/slog"
"math/rand"
<?xml version="1.0" encoding="UTF-8"?>
<robot name="robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
<link name="base_footprint"></link>
<link name="body">
<visual>
<geometry>
<box size="1 0.8 0.2" />
</geometry>
@nmnmcc
nmnmcc / Containerfile
Created September 12, 2025 09:31
ROS 2 humble
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y locales curl
RUN bash -c "bash <(curl -sSL https://linuxmirrors.cn/main.sh) --source mirrors.bfsu.edu.cn"
RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8