Skip to content

Instantly share code, notes, and snippets.

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

大齐 daqi

💭
I may be slow to respond.
  • yonyou
  • Beijing
View GitHub Profile
@daqi
daqi / .npmrc
Created October 9, 2022 07:45 — forked from blackcater/.npmrc
.npmrc configuration
# global config
# init config
init-author-name = blackcater
init-author-email = i@blackcater.dev
init-author-url = https://blackcater.com
# git tag message
message = "chore: version bump to v%s"
@daqi
daqi / grid-layout.html
Created February 3, 2023 11:16
squarespace layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>grid</title>
<style>
html,
body {
@daqi
daqi / ipValidate.ts
Created January 13, 2025 02:03
ipValidate ipv6 ipv4
/**
* 验证是否为有效的 IPv6 地址
* from https://github.com/ChrisWarwick/IPv6Regex/blob/master/IPv6Regex.psm1
* @param ip
*/
function isValidIPv6(ip: string) {
// IPv6 地址由 1-4 位十六进制数字组成的组构成
const hex = '[0-9a-fA-F]{1,4}';
// IPv6 地址可以在最后 4 个字节中嵌入 IPv4 地址
const octet = '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])';
@daqi
daqi / removeWhitespaceInJSON.ts
Last active January 13, 2025 02:22
remove whitespace in JSON
/**
* ### 基础空白字符
* - \s: 匹配所有空白字符包括空格、制表符、换页符等
* ### Unicode空白字符
* - \u00A0: 不间断空格 (NO-BREAK SPACE)
* - \u1680: OGHAM SPACE MARK
* - \u180E: MONGOLIAN VOWEL SEPARATOR
* - \u2000-\u200F: 包含了多个空格和方向控制符
* - \u2028: LINE SEPARATOR
* - \u2029: PARAGRAPH SEPARATOR
@daqi
daqi / Spec Kit “入门指南 + 进阶最佳实践”.md
Last active April 20, 2026 10:22
github/spec-kit 入门指南 + 进阶最佳实践

下面是一份面向具体开源项目 github/spec-kit 的“入门指南 + 进阶最佳实践”整理与扩展,结合其仓库现有 README、文档结构与 Spec‑Driven Development(SDD)方法论进行体系化梳理,帮助你快速、规范、可持续地使用它。


1. 项目定位速览

Spec Kit 旨在把“规格(Spec)”置于开发核心:先沉淀项目原则与功能需求,再逐步澄清、规划、分解、实现,减少“一句话→直接写代码→返工”的低效模式。它通过一组 slash 命令与模板驱动你的 AI 编码代理(Copilot / Claude Code / Gemini CLI / Cursor 等)执行结构化过程,而不是一次性大模型代码生成。

核心价值:

  • 意图优先:先写清楚“做什么 / 为什么”,再讨论“怎么做”
@daqi
daqi / microgpt.py
Created April 12, 2026 07:46 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@daqi
daqi / .npmmirror
Created May 19, 2026 02:25
npmmirror
# npm mirrors
export nvm_nodejs_org_mirror="http://registry.npmmirror.com/-/binary/node"
export nodejs_org_mirror="http://registry.npmmirror.com/-/binary/node"
export sass_binary_site="http://registry.npmmirror.com/-/binary/node-sass"
export electron_mirror="http://registry.npmmirror.com/-/binary/electron/"
export SQLITE3_BINARY_SITE="http://registry.npmmirror.com/-/binary/sqlite3"
export better_sqlite3_binary_host_mirror="https://registry.npmmirror.com-/binary/better-sqlite3"
export profiler_binary_host_mirror="http://registry.npmmirror.com/-/binary/node-inspector/"
export node_inspector_cdnurl="https://registry.npmmirror.com/-/binary/node-inspector"
export puppeteer_download_host="https://registry.npmmirror.com/-/binary"