Skip to content

Instantly share code, notes, and snippets.

View iShawnWang's full-sized avatar
🤗
2333

Shawn Wang iShawnWang

🤗
2333
View GitHub Profile
@iShawnWang
iShawnWang / prompt.md
Created December 2, 2026 02:33
DeepSeek Harness System Prompt

DSH 系统提示词 · 中文对照

  • 原文快照:8209 字节 / 57 行 / 23 段
  • 采集来源:~/.dsh/sessions/--Users-qckj-Documents-deepseek-harness-default-workspace--/session-60f87e37…/session.v4.jsonl.zstd 中的 system/message 事件(seq 717,turn 3 step 1)
  • 采集时间:2026-11-20 16:59 (Asia/Shanghai)
  • 说明:以下是本次运行实际下发的提示词的中文译文。原文为英文,DSH 本身不提供中文版系统提示词;工具名、环境变量、命令、路径一律保留原文,因为这些是模型必须逐字匹配的字面量。

第 1 段 · 身份锚点

@iShawnWang
iShawnWang / vtrack.vue
Last active November 1, 2023 07:26
v-track
// Sample Usage
<template>
<button v-track="xxxEvent" />
<input v-track="xxxEvent" />
<input v-track="() => new Date().getTime()" />
</template>
<script>
// v-track directive
Vue.directive("track", {
@iShawnWang
iShawnWang / launch.json
Last active May 8, 2023 05:55
VSCode + tsx + Auto Attach Debugger : https://github.com/esbuild-kit/tsx
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Run current script",
"runtimeExecutable": "npx",
"runtimeArgs": ["tsx"],
"program": "${file}",

Track Color Platte

Assign Track Color by Frequencies

Track Color
Kick #FF364D #FF364D
Snare #1AA1FF #1AA1FF
Clap #D68EA4 #D68EA4
Open HiHat #03C539 #03C539
@iShawnWang
iShawnWang / immer.js
Created April 28, 2022 09:40
ES6 Proxy Immer.js
const PROXY_STATE = Symbol('immer-proxy-state')
class State {
srcObj
copy
touched
parent
constructor(srcObj, parent) {
this.srcObj = srcObj
@iShawnWang
iShawnWang / optional.js
Last active April 28, 2022 09:13
ES6 Proxy Optional Chain
const optional = (srcObj) => {
return new Proxy(() => {}, {
apply: () => {
return srcObj
},
get: (__, prop) => {
if (srcObj && srcObj.hasOwnProperty(prop)) {
return optional(srcObj[prop])
} else {
return optional(undefined)
@iShawnWang
iShawnWang / Example.tsx
Last active October 31, 2021 05:19
Use Ant Design Modal in Imperative Mode
import {ModalProvider, ModalContext, Modalman} from './Modalman'
import {useContext} from 'react'
import {Modal} from 'antd'
// App.tsx
// export default () => {
// return <ModalProvider><App /><ModalProvider>
// }
export default () => {
@iShawnWang
iShawnWang / analytics.js
Created August 5, 2021 06:27 — forked from zmmbreeze/analytics.js
GA的源码 analytics.js
(function() {
/**
* 记录方法使用情况的类
* @param {Array.<boolean>} umMap 初始的使用情况
*/
var UsageManager = function(umMap) {
this.umMap = umMap || [];
};
/**
* 记录新的使用情况
@iShawnWang
iShawnWang / enum_demo.ts
Created November 25, 2019 01:57
Typescript 枚举 扩展
interface Enum {
[id: number]: string
}
const getEnumKeys = (e: Enum) => {
return Object.keys(e)
.map(key => e[key])
.filter(value => typeof value === 'string') as string[]
}