Skip to content

Instantly share code, notes, and snippets.

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

vincentYang yuezheng2006

💭
I may be slow to respond.
  • Beijing
  • 20:28 (UTC -12:00)
View GitHub Profile
@yuezheng2006
yuezheng2006 / agent.py
Created July 31, 2025 07:58 — forked from leerob/agent.py
agent.py
import os
import json
import subprocess
from anthropic import Anthropic
# Tool definitions
TOOLS = [
{
"name": "list_files",
"description": "List files and directories at a given path",
@yuezheng2006
yuezheng2006 / get12306RemainTicket.js
Last active February 24, 2016 03:20 — forked from ufologist/get12306RemainTicket.js
获取12306余票信息
/**
* 获取12306余票信息
*
* 查询列车的余票信息
* GET https://dynamic.12306.cn/otsweb/order/confirmPassengerAction.do?method=getQueueCount&train_date=2013-02-05&train_no=240000D31307&station=D313&from=VNP&to=SHH
*
* URL参数解析
* train_date // 不用说了吧
* train_no // 列车ID, 在余票查询结果车次的span中可以得到
* station // 车次
@yuezheng2006
yuezheng2006 / understand-require.js
Created February 24, 2016 03:18 — forked from ufologist/understand-require.js
理解RequireJS中的模块
/**
* 理解RequireJS中的模块
* ================================
* 重点在于介绍RequireJS模块定义/运作/使用的基本原理, 不考虑依赖管理即其他方面的问题.
* 看看define和require到底做了些什么.
*
* @author Sun
* @version 2013-12-27
*/
@yuezheng2006
yuezheng2006 / autoplay-audio-ios.html
Created February 24, 2016 03:17 — forked from ufologist/autoplay-audio-ios.html
在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title>
</head>
<body>
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1>
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p>
@yuezheng2006
yuezheng2006 / fake-autoplay-audio-ios-safari.html
Created February 24, 2016 03:16 — forked from ufologist/fake-autoplay-audio-ios-safari.html
Fake auto play html audio in iOS Safari the right way
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Fake auto play html audio in iOS Safari the right way</title>
</head>
<body>
<h1>在 iOS Safari 中假装自动播放 HTML5 audio(音乐) 的正确方式</h1>
<p>核心原理: 通过一个用户交互事件来主动 play 一下 audio</p>
@yuezheng2006
yuezheng2006 / app.js
Created February 24, 2016 03:16 — forked from ufologist/app.js
SeaJS load module mechanism
seajs.use('./js/main', function(main) {
main.hello();
});