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
#### Setup | |
- Dotnet 3.1 | |
- https://dotnet.microsoft.com/download (SDK required for development) | |
- SQL Server Download links (minium sql express required) | |
- https://www.microsoft.com/en-gb/sql-server/sql-server-downloads | |
- https://www.sqlshack.com/how-to-install-sql-server-express-edition/ (How to install SQL Express) | |
- SQL Server 2019 Express Edition (English): (Short Direct Links) | |
- Basic (~249 MB): https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPR_x64_ENU.exe | |
- Advanced (~790 MB): https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPRADV_x64_ENU.exe |
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
function getYouTubeVideoIdByUrl(url) { | |
const reg = /^(https?:)?(\/\/)?((www\.|m\.)?youtube(-nocookie)?\.com\/((watch)?\?(feature=\w*&)?vi?=|embed\/|vi?\/|e\/)|youtu.be\/)([\w\-]{10,20})/i | |
const match = url.match(reg); | |
if (match) { | |
return match[9]; | |
} else { | |
return null; | |
} | |
} |
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
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Future enhancements - use events rather than an infinite loop | |
$wsh = New-Object -ComObject WScript.Shell | |
while (1) { |