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
# CONFIGURATION | |
$dirToBackup = "C:\Users\John" # path to directory we back up (no following backslash) | |
$outputDir = "E:\bak" # path directory we store our backups (no following backslash) | |
$params = '-t7z', '-r', '-ms=off', '-mx1' | |
# THE SCRIPT | |
$fullBackup = $outputDir + "\full.7z" | |
if (Test-Path ($fullBackup)) { # Let's check whether full backup exists | |
Write-Host "Full backup already exists" |
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
# http://stackoverflow.com/a/9387415/1420356 | |
find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n |
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
(async () => { | |
const text = prompt("Enter text to type:"); | |
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
const input = document.getElementById("noVNC_keyboardinput"); | |
const keydown = (key) => input.dispatchEvent(new KeyboardEvent("keydown", { key })); | |
for (let i = 0; i < text.length; i++) { keydown(text[i]); await sleep(50); } | |
})(); |