Skip to content

Instantly share code, notes, and snippets.

View zh30's full-sized avatar
🐲

Henry Zhang zh30

🐲
View GitHub Profile
@zh30
zh30 / get_subtitle_files.js
Created March 21, 2025 10:24 — forked from dansleboby/get_subtitle_files.js
Suno.com Aligned Words Fetcher to SRT or LRC file
// ==UserScript==
// @name Suno Aligned Words Fetcher with Auth
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Fetch aligned words with auth and add a button under the image on Suno pages.
// @author Your Name
// @match https://suno.com/song/*
// @grant none
// ==/UserScript==
@zh30
zh30 / gitca.md
Last active July 29, 2024 08:43
git ca

Git Commit Analyzer: 革新你的 Git 工作流程

Git Commit Analyzer 是一款革命性的 Git 插件,它利用人工智能技术自动生成有意义的提交信息,基于你的暂存更改。无论你是经验丰富的开发者还是编程新手,这个强大的工具都能显著提升你的 Git 使用体验。

主要特性

  • 🤖 自动生成符合 Git Flow 规范的提交信息
  • 🌐 支持本地 (Ollama) 和远程 (Groq)AI 模型
  • 💻 交互式模式,让你可以选择 AI 提供商,使用、编辑或取消建议的提交信息
  • 🖥️ 跨平台兼容 (Linux, macOS, Windows)
@zh30
zh30 / aes-256-cbc.js
Created November 27, 2023 08:17 — forked from siwalikm/aes-256-cbc.js
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {
@zh30
zh30 / example.js
Last active January 4, 2023 14:50
tag-function
function example(template, ...values) {
console.log(template);
console.log(values);
}
const a = 1, b = 2, c = 3;
example`Testing ${a} ${b} ${c}.`;
@zh30
zh30 / Stack.md
Last active March 24, 2022 01:54
数据结构与算法 - Data Structures and Algorithms

什么是栈?

栈是一种遵从后进先出(LIFO)原则的有序集合。新添加或待删除的元素都保存在栈的同一端,称作栈顶,另一端就叫栈底。在栈里,新元素都靠近栈顶,旧元素都接近栈底。

栈的用途

用在编程语言的编译器和内存中保存变量、方法调用等,也被用于浏览器历史记录(浏览器的返回按钮)。

实现栈

@zh30
zh30 / install-tockloader.md
Created January 13, 2022 02:04
命令安装 Tockloader
pip3 install --upgrade tockloader
@zh30
zh30 / DebounceSelect.tsx
Created December 16, 2021 01:35
动态搜索 select react 组件
import { useState, ReactNode, useRef, useMemo } from 'react';
import { Select, Spin } from 'antd';
import { SelectProps } from 'antd/es/select';
import debounce from 'lodash/debounce';
export interface DebounceSelectProps<ValueType = any>
extends Omit<SelectProps<ValueType>, 'options' | 'children'> {
fetchOptions: (search: string) => Promise<ValueType[]>;
debounceTimeout?: number;
defaultOptions?: ValueType[];
@zh30
zh30 / html-tag-article.html
Last active April 23, 2021 03:09
HTML <article> 元素表示文档、页面、应用或网站中的独立结构,其意在成为可独立分配的或可复用的结构,如在发布中,它可能是论坛帖子、杂志或新闻文章、博客、用户提交的评论、交互式组件,或者其他独立的内容项目。
<article class="forecast">
<h1>Weather forecast for Seattle</h1>
<article class="day-forecast">
<h2>03 March 2018</h2>
<p>Rain.</p>
</article>
<article class="day-forecast">
<h2>04 March 2018</h2>
<p>Periods of rain.</p>
</article>
@zh30
zh30 / manjaro-change-default-browser.md
Created November 19, 2020 13:08 — forked from boo1ean/manjaro-change-default-browser.md
manjaro-change-default-browser.md

Update $BROWSER env var

vim ~/.profile

export BROWSER=/usr/bin/google-chrome-stable

Remove mime bindings