Skip to content

Instantly share code, notes, and snippets.

@inertia42
inertia42 / airpods-pro-ANC-switch.scpt
Last active February 20, 2024 02:53
Switch AirPods Pro between noise cancelling and transparency mode with apple script for Monterey.
# Modified from https://gist.github.com/rossinek/c0807a6a08cbfbf3f14259c70d15e643
set airpodName to "AirPods Pro" # This item should be the name of your AirPods Pro
set soundName to "声音"
set ancName to "降噪"
set transparencyName to "通透模式"
# for English Users
# set soundName to "Sound"
# set ancName to "Noise Cancellation"
# set transparencyName to "Transparency"
@inertia42
inertia42 / u2_update.py
Last active August 30, 2020 13:22
U2更新种子securekey(Transmission)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# -1. 感谢tongyifan,本脚本由他的qBittorrent版本修改而来,项目地址 https://gist.github.com/tongyifan/83220b417cffdd23528860ee0c518d15
# 0. 免责:仅在本人的Transmission v2.94上测试通过,本人不承担任何责任
# 1. 安装依赖: pip3 install requests transmissionrpc
# 2. 修改代码开头的apikey和transmission_config
# 3. 运行: python3 u2_update.py
# 4. 中间有报错就再运行,直到显示找到0个未被更新的种子为止
# 5. 请勿手动中断脚本运行!