This simple script loads whatever is inside the parenthesis into ram before executing it.
This can be used, for example, to run a script that deletes itself, avoiding any error messages by cmd.exe.
@(goto) 2>nul & ( rem some comment too...| function MakeEnumValue(key, value) { | |
| key = key.toString(); | |
| const o = {}, | |
| v = arguments.length > 1 ? value : key, | |
| s = Symbol(arguments.length > 1 ? `ENUMVALUE[(${typeof value})${key}=${JSON.stringify(value)}]` : `ENUMVALUE[${key}=]`); | |
| Object.defineProperty(o, '[[Symbol]]', { value: s }, Object.create(null)); | |
| Object.defineProperty(o, 'valueOf', { value: () => v }, Object.create(null)); | |
| Object.defineProperty(o, 'toString', { value: () => v.toString() }, Object.create(null)); | |
| Object.defineProperty(o, 'toJSON', { value: (space = '') => JSON.stringify(v, null, space) ?? `[[${key}]]` }, Object.create(null)); | |
| return Object.freeze(o); |
| Option Explicit | |
| WScript.Echo "This script is provided by Microsoft Corporation to demonstrate techniques that can be used to search, download," | |
| WScript.Echo "and install updates through the Windows Update Agent API." | |
| WScript.Echo "" | |
| WScript.Echo "This script is not intended as production code." | |
| WScript.Echo "" | |
| ' Supported parameters: | |
| ' /AppName: Name to pass to the WUA API as the 'calling application'; |
| @REM WSB.CMD | |
| @REM Launches Windows Sandbox with a configuration file that allows | |
| @REM a folder (defaulting to the current folder of the script), to be mapped | |
| @REM either as read-only (default) or read-write. | |
| @REM ... Featuring: | |
| @REM - the ugliest cmd-pwsh polyglot ever | |
| @REM - embedded XML data with variable replacement | |
| @REM - escaped batch multiline strings | |
| JohnPlanetary commented on Jul 12, 2021 • | |
| As of 16-MARCH-2024 here are the TSA that I know work and are available for real use. | |
| Do your own investigation in order to find if any is appropriate for your use case. | |
| "Credible" information is personal opinion based on information that I found, doesn't mean that the service is not credible at least in certain jurisdictions. | |
| Digicert: | |
| http://timestamp.digicert.com | |
| Credible: Yes. [Adobe Approved Trust List] and [Windows Cert Store]. | |
| Server returns the expected hash value for: SHA256, SHA384, SHA512 | |
| Working Hashes: SHA1, SHA256, SHA384, SHA512 |
| @echo off | |
| REM SIMPLE OPENVPN-CONNECT (ovpnconnector) RECONNECT SCRIPT | |
| REM REQUIRES OpenVPN Connect (ovpnconnector) + pwsh (powershell core) TO BE INSTALLED | |
| REM REQUIRES ADMIN RIGHTS | |
| setlocal EnableDelayedExpansion | |
| REM re-run as admin if not already | |
| net session >nul 2>&1 | |
| if errorLevel 1 ( |
| # update_android_DCIM_media_datetime.ps1 | |
| Get-ChildItem *.jpg, *.mp4, *.mkv -Recurse | ForEach-Object { | |
| $name = $_.BaseName | |
| $year = $name.Substring(4, 4) | |
| $month = $name.Substring(8, 2) | |
| $day = $name.Substring(10, 2) | |
| $hour = $name.Substring(13, 2) | |
| $minute = $name.Substring(15, 2) | |
| $second = $name.Substring(17, 2) |
This simple script loads whatever is inside the parenthesis into ram before executing it.
This can be used, for example, to run a script that deletes itself, avoiding any error messages by cmd.exe.
@(goto) 2>nul & ( rem some comment too...reference: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw
Uses CommandLineToArgvW to tokenize a give $CommandLine string.
Tests follow.
function tokenize([parameter(ValueFromPipeline)][string] $CommandLine) {| // ==UserScript== | |
| // @name Scrolller Redirect with NO NAV | |
| // @namespace https://your-namespace.example.com/ | |
| // @version 1.0 | |
| // @description Redirects to the media URL on Scrolller.com after waiting for the element to appear (excluding URLs with ?NONAV and scrolller.com/r/*) | |
| // @author YourName | |
| // @match https://scrolller.com/* | |
| // @exclude https://scrolller.com/r/* | |
| // @grant none | |
| // ==/UserScript== |
| // check version | |
| node -v || node --version | |
| // list locally installed versions of node | |
| nvm ls | |
| // list remove available versions of node | |
| nvm ls-remote | |
| // install specific version of node |