Skip to content

Instantly share code, notes, and snippets.

View tzengyuxio's full-sized avatar

Tzeng Yuxio tzengyuxio

View GitHub Profile
@tzengyuxio
tzengyuxio / ditto-release.js
Last active July 15, 2025 10:19
Extract Release Data from Ditto Music to JSON
/**
* 使用方式:
* 1. 開啟「Release Details」頁面。
* 2. 貼上此腳本於瀏覽器開發者工具 Console 執行。
* 3. 將會:
* - 擷取專輯資訊與歌曲清單
* - 加入 SmartLink 連結
* - 自動下載 JSON 檔案
* - 同時複製到剪貼簿(需視窗聚焦)
*/
@tzengyuxio
tzengyuxio / bulk-suno.js
Last active July 15, 2025 10:19
Extract Song Details from SUNO to JSON
/**
* v2 bulk-suno.js
* 🎼 擷取 React App 中的歌曲資訊(透過 Fiber Tree)
*
* ✅ 使用方式:
* 1. 確保已安裝並啟用 React Developer Tools(Chrome 擴充)
* 2. 展開至少一首歌詞(讓歌詞與 metadata 被載入)
* 3. 打開開發者工具 Console,貼上此腳本執行
* 4. 成功後會將 JSON 格式資料自動下載並複製至剪貼簿
*
@tzengyuxio
tzengyuxio / gist:4284108
Created December 14, 2012 09:44
Fetch IMDb Top 250 into CSV file.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import HTMLParser
import csv
import datetime
import codecs, cStringIO # for UnicodeWriter
response = urllib2.urlopen('http://www.imdb.com/chart/top')
@tzengyuxio
tzengyuxio / tuili.py
Created May 30, 2019 16:39
2018 年刑偵科推理試題
#!/usr/bin/env python3
# 題目: https://imgur.com/a/WvVHKUO
import string
base = 4
digs = string.digits + string.ascii_letters
N = 4 ** 10
@tzengyuxio
tzengyuxio / MacInstall.md
Created March 22, 2019 16:59
Install Note (Mac Mini 2018, 冬至)

終端機

  • Hack Regular 16 點
  • [v] 柔邊處理文字
  • 使用粗體
  • [v] 閃爍游標

Homebrew

Homebrew

爭清塗愁時月修聲,自前干中。
    衰丘步二 結況
遮生月醉田,李音不忽君。歸朝不前遠,涼梅遠不留。
    庭答德二 項物 長能
Rowhild;
CORIOLANUS:
But I think'st true.
Second Citizen:
By the lord!
'Since, bay them as forth from me.
CLARENCE:
gless
wace us a glause,
Than ouch the camfal dean!
CORIOLANUS:
Whesale with-let Marcer terpty body of comk
Tose thus sear it thy and house hithy
meirs with your rricmord, all resw.
Gor expoace they kincensuling but broskry Romeighcciod,
One: loxte.
@tzengyuxio
tzengyuxio / divisions.py
Created August 17, 2016 17:02
Fetch all county-level administrative divisions of PRC
#!/usr/bin/env python3
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.parse import urljoin
import io
import json
homepage = "https://zh.wikipedia.org/zh-tw/Category:%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E5%90%84%E7%9C%81%E7%BA%A7%E8%A1%8C%E6%94%BF%E5%8C%BA%E8%A1%8C%E6%94%BF%E5%8C%BA%E5%88%92%E6%A8%A1%E6%9D%BF" # noqa
@tzengyuxio
tzengyuxio / blogstats.sh
Created April 19, 2012 02:04
stats of octopress blogpost
#!/bin/bash
# start year and end year
SYEAR=2005
EYEAR=`date "+%Y"`
POSTPATH=~/github/octopress/source/_posts/
echo
echo "YEAR File # Word Count"