This file contains 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
# Define the task name | |
$taskName = "ChocoUpgrade" | |
# Remove existing task if it exists | |
if (Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue) { | |
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false | |
Write-Host "Existing scheduled task '$taskName' removed." | |
} | |
# Define the log file path on the Desktop |
This file contains 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
$response = Invoke-WebRequest 'google.at' | |
$response.headers.Date | |
# Sat, 31 Aug 2024 05:31:49 GMT | |
$parsedDate = [datetime]::Parse($response.headers.Date) | |
set-date $parsedDate |
This file contains 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
#Requires -RunAsAdministrator | |
# Disable telemetry in Visual Studio 2022 - https://learn.microsoft.com/en-us/visualstudio/ide/visual-studio-experience-improvement-program?view=vs-2022 | |
New-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\VSCommon\17.0\SQM" -Name "OptIn" -Value "0" -PropertyType "DWORD" -Force | |
# Delete telemetry directories | |
Remove-Item -Path "$env:APPDATA\vstelemetry" -Recurse -Force -ErrorAction SilentlyContinue | |
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\VSApplicationInsights" -Recurse -Force -ErrorAction SilentlyContinue | |
Remove-Item -Path "$env:PROGRAMDATA\Microsoft\VSApplicationInsights" -Recurse -Force -ErrorAction SilentlyContinue | |
Remove-Item -Path "$env:TEMP\Microsoft\VSApplicationInsights" -Recurse -Force -ErrorAction SilentlyContinue |
This file contains 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
# https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#register-the-microsoft-package-repository | |
# https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2204 | |
# https://stackoverflow.com/questions/73312785/dotnet-sdk-is-installed-but-not-recognized-linux-ubuntu-popos-22-04/73394298#73394298 | |
# drops old dependencies and repos | |
sudo snap remove dotnet-sdk | |
sudo apt remove 'dotnet*' | |
sudo apt remove 'aspnetcore*' | |
sudo apt remove 'netstandard*' | |
sudo apt autoremove -y |
This file contains 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
#!/bin/bash | |
find . -iname '*.avi' -o -iname '*.3gp' -o -iname '*.wmv' | while read -r FILE; do | |
#echo "Processing file '$FILE'" | |
NEWFILE="$FILE.upgradeFromLegacyVideoformat.mp4" | |
if test -f "$NEWFILE"; then | |
echo "$NEWFILE exists." | |
fi | |
ffmpeg -nostdin -i "$FILE" "$NEWFILE" | |
done |
This file contains 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
dir *.ts | foreach-object { $newname = $_.Basename + ".mp4"; ffmpeg -i "$_" -f mp4 -c:v copy -c:a copy $newname } |
This file contains 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
#!/bin/bash | |
# This scripts wait <TIMEOUTINSECONDS> till hdmi connection got established or shutdown if no tvheadend recording is running, upcomming or some stream is consumed, served by tvheaden | |
# Howto https://debianisttoll.blogspot.com/2021/07/wait-till-hdmi-is-connected-before.html | |
# Source https://gist.githubusercontent.com/stesee/9ebb11cc2db6a58e6b42afb2d74e7e7b/raw/7327e42950c449c1153ebf546f60ee1d8e3d0d0d/waitTillHdmiConnected.sh | |
# install stuff before using this script | |
# sudo apt install libxml-xpath-perl curl | |
# setup systemconfiguration |
This file contains 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
#!/bin/bash | |
# Based on | |
# Authentication https://github.com/d3suu/ZTE_MF971V_CurlAuth/blob/master/zte_login_pin.sh | |
# SMS parsing https://gist.github.com/mariodian/65641792700d237d30f3f47d24c746e0 | |
# Cookie things https://stackoverflow.com/questions/15995919/how-to-use-curl-to-send-cookies | |
URL=http://192.168.1.1 | |
PASSWORD="XXXX" |
This file contains 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
static function OnBeforeRequest(oSession: Session) { | |
if (oSession.RequestMethod == 'GET' && oSession.PathAndQuery.IndexOf('part_of_your_url') > 0) { | |
oSession.utilCreateResponseAndBypassServer(); | |
oSession.oResponse.headers.HTTPResponseCode = 401; | |
oSession.oResponse.headers.HTTPResponseStatus = '401 Not Authorized'; | |
oSession.oResponse.headers['Access-Control-Allow-Origin'] = '*'; | |
oSession.utilSetResponseBody('response_body'); | |
} | |
} |
NewerOlder