Skip to content

Instantly share code, notes, and snippets.

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

Jace Chow MrZhouZh

💭
I may be slow to respond.
View GitHub Profile
@MrZhouZh
MrZhouZh / spec.md
Created July 22, 2025 09:23 — forked from CypherpunkSamurai/spec.md
Kiro AI System Prompt

System Prompt

Identity

You are Kiro, an AI assistant and IDE built to assist developers.

When users ask about Kiro, respond with information about yourself in first person.

You are managed by an autonomous process which takes your output, performs the actions you requested, and is supervised by a human user.

You talk like a human, not like a bot. You reflect the user's input style in your responses.

@MrZhouZh
MrZhouZh / README.md
Last active July 22, 2025 01:44
Weekly Report Prompts

You are a technical writer tasked with creating a weekly progress report based on git commit history.

Task: Analyze the provided git commits from the past week and generate a comprehensive weekly report, in chinese, with no more than 200 chars.

Git Command to Execute First:

git --no-pager log --author="$(git config user.email)" --since="1 week ago" --pretty=format:"COMMIT: %H%nAuthor: %an <%ae>%nDate: %ad%nSubject: %s%nBody: %b%n"

Input: Git commit information including:

@MrZhouZh
MrZhouZh / code-editor-rules.md
Created February 19, 2025 09:55 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@MrZhouZh
MrZhouZh / exportLongImg-deepseek.ts
Last active February 14, 2025 03:04
Export PDF by html2canvas + jspdf
import html2canvas from 'html2canvas';
import { message } from 'antd';
export interface ExportLongImgOptions {
filename?: string;
scale?: number;
quality?: number;
maxChunkHeight?: number;
type?: 'png' | 'jpeg';
backgroundColor?: string | null;
@MrZhouZh
MrZhouZh / connectHTMLelements_SVG.png
Created December 16, 2024 10:16 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png

playground

@function themed($color) {
  @return $color;
}

@mixin triangle-arrow($direction: up, $width, $height, $color, $borderStyle: solid) {
  width: 0;
  height: 0;
@MrZhouZh
MrZhouZh / calculateWinner.js
Last active April 30, 2024 07:22
react tic-tac-toe 小游戏算法
/**
* 计算胜负
* refs: https://react.dev/learn/tutorial-tic-tac-toe
* leetcode: https://leetcode.cn/problems/find-winner-on-a-tic-tac-toe-game
*/
export default function calculateWinner(squares) {
const lines = [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8],
@MrZhouZh
MrZhouZh / README.md
Last active April 29, 2024 06:05
1A2B 猜数字算法

1A2B 猜数字游戏

标准规则:

一方出数字, 一方猜. 数字不重复. 出数者需根据猜的人给的数字给出几个A几个B.

A 代表位置且数字都正确 B 代表数字正确但位置不正确

例如: 出 4057

@MrZhouZh
MrZhouZh / getPercentWithPrecision.js
Created April 16, 2024 02:43
席位分配-最大余数法
/**
* 议会席位分配
* echarts source code: https://github.com/apache/echarts/commit/fa8db37e5e11b74cbe6e377399c1bb49b8847704
* echarts issues: https://github.com/apache/echarts/issues/5850
* Ovilia fix: http://zhangwenli.com/blog/2017/06/13/pie-percentage
* wiki 最大余数法: https://en.wikipedia.org/wiki/Largest_remainder_method
*/
function getPercentWithPrecision(valueList = [], idx, precision) {
var sum = valueList.reduce((acc, val) => acc + val, 0)
if (sum === 0) return 0