Skip to content

Instantly share code, notes, and snippets.

View 1208nn's full-sized avatar

ShH Y 1208nn

  • Hangzhou
  • 20:46 (UTC +08:00)
View GitHub Profile
@1208nn
1208nn / README.md
Last active July 11, 2023 14:29
乐课网助手:用于快速完成乐课网录播课学习任务,仅限学习交流,后果一概不负责

乐课网助手

用于快速完成乐课网录播课学习任务

安装

  1. 桌面设备或Android手机可以安装用户脚本管理器Tampermonkey篡改猴或其他插件如油猴
  2. iOS 可以使用via Userscripts for Safari gear Alook等支持用户脚本的Browsers或插件
  3. Android 可以使用via等支持用户脚本的Browsers
  4. 更多支持的程序可以在Greasy Fork查看,同时也提供安装教程
function cdp {
$shell = New-Object -ComObject Shell.Application
$windows = $shell.Windows() | Where-Object { $_.FullName -eq 'C:\Windows\explorer.exe' && $_.LocationURL -match 'file:///' }
if ($windows.Count -eq 0) {
Write-Host "No window found"
return
}
$selectedWindow = if ($windows.Count -eq 1) {
$windows
}
import subprocess
import pystray
from pystray import MenuItem as item
from PIL import Image, ImageDraw
def get_warp_status():
result = subprocess.run(
["warp-cli", "status"], capture_output=True, text=True, shell=True
)
@1208nn
1208nn / TornCrimesHideStories.user.js
Last active March 16, 2024 14:46
Hides torn's crime stories but keeps outcome (success/fail) info. Thanks to https://greasyfork.org/scripts/477977
// ==UserScript==
// @name Torn Crimes Hide Stories
// @namespace https://github.com/1208nn
// @version 0.4.2
// @description Hides torn's crime stories but keeps outcome (success/fail) info. Thanks to https://greasyfork.org/scripts/477977
// @author 1208nn
// @match https://www.torn.com/loader.php?sid=crimes*
// @icon https://www.torn.com/favicon.ico
// @grant none
// @downloadURL https://gist.github.com/1208nn/78cc02183c222412ef24457f7e704275/raw/TornCrimesHideStories.user.js
@1208nn
1208nn / TornCrimesRewardsValue.user.js
Last active March 23, 2024 13:43
Shows the market value of all crime rewards. Thanks to https://greasyfork.org/scripts/476788
// ==UserScript==
// @name Torn Crimes Rewards Value
// @namespace https://github.com/1208nn
// @version 0.7.3
// @description Shows the market value of all crime rewards. Thanks to https://greasyfork.org/scripts/476788
// @author 1208nn
// @match https://www.torn.com/loader.php?sid=crimes*
// @icon https://www.torn.com/favicon.ico
// @grant GM_addStyle
// @grant GM_registerMenuCommand
import winreg
from os import getcwd
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Environment", 0, winreg.KEY_READ | winreg.KEY_WRITE)
path, _ = winreg.QueryValueEx(key, "Path")
if "%N0ENV%" not in path:
path += ";%N0ENV%"
path=path.replace(';;',';')
winreg.SetValueEx(key, "Path", 0, winreg.REG_EXPAND_SZ, path)