This file contains 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
local mp = require 'mp' | |
function string:trim() | |
return (self:gsub("^%s*(.-)%s*$", "%1")) | |
end | |
local function pwshexec(command) | |
local args = { | |
"powershell", "-NoProfile", "-Command" | |
} |
This file contains 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
-- autosave.lua | |
-- | |
-- Instead of saving only on quit, 'watch later' data is saved periodically during playback and when a file is unloaded. | |
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.). | |
-- | |
-- You can configure the save period by editing the follow line. | |
-- | |
-- local save_period = 60 | |
-- | |
-- This will set the save period to once every 60 seconds of playback, time while paused is not counted towards the save period timer. |
This file contains 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
//[Action] Github:Create a workflow dispatch event | |
import { Octokit } from "@octokit/core"; | |
import { paginateRest } from "@octokit/plugin-paginate-rest"; | |
import { default as github } from "@pipedream/github"; | |
import { ConfigurationError } from "@pipedream/platform"; | |
const CustomOctokit = Octokit.plugin(paginateRest); | |
export default defineComponent({ | |
name: "Create a workflow dispatch event", |
This file contains 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
# https://github.com/shinchiro/mpv-packaging/blob/master/mpv-root/installer/updater.ps1 | |
$fallback7z = Join-Path (Get-Location) "\7z\7zr.exe"; | |
$useragent = "mpv-win-updater" | |
function Get-7z { | |
$7z_command = Get-Command -CommandType Application -ErrorAction Ignore 7z.exe | |
if ($7z_command) { | |
return $7z_command.Source | |
} | |
$7zdir = Get-ItemPropertyValue -ErrorAction Ignore "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip" "InstallLocation" |
This file contains 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
# -*- encoding: utf-8 -*- | |
from telethon import TelegramClient | |
import re,time | |
api_id = 123456 | |
api_hash = '123456' | |
toBot="@xxxxxx_bot" | |
client = TelegramClient('telethon', api_id, api_hash) | |
async def get_latest(entity): | |
message = await client.get_messages(entity,1) |
This file contains 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
# -*- encoding: utf-8 -*- | |
# python3.6 | |
import json | |
import os | |
import requests | |
th_api = "https://api.biliintl.com" | |
BangumiInfoUrl = th_api + "/intl/gateway/web/view/ogv_collection" |
This file contains 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
# -*- encoding: utf-8 -*- | |
from netaddr import * | |
import os | |
import argparse | |
# pyinstaller需要用以下方法获得exe所在位置 | |
# workDir = os.path.dirname(os.path.realpath(sys.argv[0])) | |
workDir = os.getcwd() | |
def cidrReader(file): | |
with open(file,'r',encoding='utf-8') as f: |