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
| import struct | |
| import sys | |
| import os | |
| import re | |
| import zlib | |
| from datetime import datetime, timezone | |
| import ctypes | |
| import ctypes.wintypes as wintypes | |
| # Load DLLs |
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 utils = require 'mp.utils' | |
| local local_path = require 'local-path' | |
| local user_prefs = {} | |
| user_prefs.cache = mp.get_property_bool('cache') | |
| local cache_dump_seconds = 5 | |
| local min_cache_seconds = 1 | |
| local pid = mp.get_property_number('pid') | |
| local audio_sample_path = (os.getenv('TEMP') or os.getenv('TMP') or '.') .. '/mpv-media-' .. pid .. '.mka' | |
| local function fix_sync(path) |
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
| $folderPath = "C:\Path\To\Directory" | |
| # Process matching screenshot files | |
| Get-ChildItem -Path $folderPath -Filter "Screenshot_*.png" | ForEach-Object { | |
| $fileName = $_.BaseName | |
| # Match Screenshot_YYYYMMDD_HHMMSS and extract timestamp | |
| if ($fileName -match '^Screenshot_(\d{8})_(\d{6})') { | |
| $date = $matches[1] | |
| $time = $matches[2] |
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
| # Get all DLL files in the specified directory and its subdirectories | |
| $directory = "C:\your\directory\path" | |
| $dllFiles = Get-ChildItem -Path $directory -Filter "*.dll" -File -Recurse | |
| # Convert the paths to forward slashes and replace directories two levels up with a period | |
| $paths = $dllFiles | ForEach-Object { | |
| $relativePath = $_.FullName -replace '^(.*)\\(\w+)\\(\w+)\\(.+)$', '.\$3\$4' | |
| $relativePath = $relativePath -replace "\\","/" | |
| $relativePath | |
| } |