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
local mp = require 'mp' | |
local block = true | |
function string:trim() | |
return (self:gsub("^%s*(.-)%s*$", "%1")) | |
end | |
-- safe protocol (copied from mpv ytdl_hook.lua) | |
------------------------------------------------------------------------ | |
local function Set (t) |
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
//[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 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
# 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 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
# -*- 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 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
# -*- 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 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
# -*- 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: |