This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter(Position=0, Mandatory=$true, ParameterSetName="process")] | |
| [string]$processName, | |
| [Parameter(Position=1)] # 不取 Win32_Processor,太慢了! | |
| [int]$smtThreads = 2, # 每核心多少个线程 | |
| [int]$startId, # 起始ID | |
| [int]$endId, # 结束ID | |
| [switch]$y # 确认 | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import httpx | |
| from pathlib import Path | |
| def getVersionByPlatform(client:httpx.Client, platform:int) -> tuple[str, str, str]: | |
| resp = client.get('/api/package_info', params={'platform': platform}) | |
| resp.raise_for_status() | |
| data = resp.json() | |
| download_link = httpx.URL(data['data']['download_link']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| function isMute() { | |
| local result=`/usr/bin/dbus-send --session --print-reply=literal\ | |
| --dest=org.freedesktop.Notifications --type=method_call\ | |
| /org/freedesktop/Notifications\ | |
| org.freedesktop.DBus.Properties.Get\ | |
| string:'org.freedesktop.Notifications'\ |