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
$Key = "your azure batch key here" | |
$BatchAccount = "your azure batch account here" | |
$endpoint = "pools" # The endpoint https://docs.microsoft.com/en-us/rest/api/batchservice/pool/list | |
$verb = "GET" # "POST" | |
$version = "2020-09-01.12.0" # Api version used | |
$bodySize= "" # This is the body length. You can get it with the first Auth failure | |
$bodyType= "" # "application/json; odata=minimalmetadata" # Content type needs to be this in POST requests | |
$sharedKey = [System.Convert]::FromBase64String($Key) | |
$date = [System.DateTime]::UtcNow.ToString("R") |
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
@REM Note that we scale down the video to 720p. Expect 200Mb to be converted into 70Mb. 1M in mpeg is too broken so we selected 5M | |
ffmpeg.exe -i original_video.mts -filter:v scale=720:-1 -vcodec mpeg4 -b:v 5M -acodec libmp3lame -b:a 128k output_video.mp4 |
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
# First add it to the list (it is not there initially) | |
$LanguageList = Get-WinUserLanguageList | |
$LanguageList.Add("qaa-latn") | |
Set-WinUserLanguageList $LanguageList -Force | |
# Refresh the list (may not be needed) | |
$LanguageList = Get-WinUserLanguageList | |
# Get reference to the locale we want to remove | |
$Language = $LanguageList | where LanguageTag -eq "qaa-Latn" | |
$LanguageList.Remove($Language) | |
Set-WinUserLanguageList $LanguageList -Force |
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
Rem Based on https://stackoverflow.com/questions/26992886/set-proxy-through-windows-command-line-including-login-parameters | |
set HTTP_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port | |
set FTP_PROXY=%HTTP_PROXY% | |
set HTTPS_PROXY=%HTTP_PROXY% |
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
REM Download ffmpeg from https://www.ffmpeg.org/download.html. | |
REM Place ffmpeg.exe in the folder with the vob files | |
REM Merge all vob files into one | |
REM VTS_01_0.VOB is usually the menu which you may not want | |
if exist VTS_01_7.VOB ( | |
copy /b VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB+VTS_01_5.VOB+VTS_01_6.VOB+VTS_01_7.VOB ConCat.vob | |
) else if exist VTS_01_6.VOB ( | |
copy /b VTS_01_1.VOB+VTS_01_2.VOB+VTS_01_3.VOB+VTS_01_4.VOB+VTS_01_5.VOB+VTS_01_6.VOB ConCat.vob | |
) else if exist VTS_01_5.VOB ( |
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
$UserKey = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" | |
# Show hidden items | |
Set-ItemProperty -Path $UserKey -Name "Hidden" -Value 1 | |
Set-ItemProperty -Path $UserKey -Name "ShowSuperHidden" -Value 2 | |
# Show file extensions | |
Set-ItemProperty -Path $UserKey -Name "HideFileExt" -Value 0 | |
# Launch to PC view | |
Set-ItemProperty -Path $UserKey -Name "LaunchTo" -Value 1 | |
Stop-Process -Name Explorer |
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
$solutionName="SampleDll" | |
$pfxPassword="password" | |
$pvkFilePath="$PSScriptRoot\$($solutionName)Key.pvk" | |
$cerFilePath="$PSScriptRoot\$($solutionName)Key.cer" | |
$pfxFilePath="$PSScriptRoot\$($solutionName)Key.pfx" | |
$snkFilePath="$PSScriptRoot\$($solutionName)Key.snk" | |
if (![System.IO.File]::Exists($pfxFilePath)){ |
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
# To log in as root user first we have to enable it, to do so type the following command whilst logged in as the default pi user: | |
sudo passwd root | |
# Disable autologin | |
raspi-config | |
reboot | |
# And then logout back in as the user 'root' using the password you just created. Now we can rename the the default pi user name. The following method renames the user 'pi' to 'newname', replace this with whatever you want. Type the command: | |
usermod -l newname pi | |
# Now the user name has been changed the user's home directory name should also be changed to reflect the new login name: | |
usermod -m -d /home/newname newname | |
# Now logout and login back in as newname. You can change the default password from raspberry to something more secure by typing following command and entering a new password when prompted: |
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
<# | |
.SYNOPSIS | |
This Azure Automation runbook automates Azure API Management backup to Blob storage and deletes old backups from blob storage. | |
.DESCRIPTION | |
You should use this Runbook if you want manage Azure API Management backups in Blob storage. | |
This is a PowerShell runbook, as opposed to a PowerShell Workflow runbook. | |
It requires AzureRM.ApiManagement module to be installed. | |
The script uses the AzureRunAsConnection connection to login and perform the backup. |
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
@REM Note that it doesn't like spaces in the names | |
npm install --global gulp-cli | |
npm install gulp-smushit | |
gulp |