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
mkdir pipdep && cd pipdep | |
echo pysocks > requirements.txt | |
echo pyvmomi >> requirements.txt | |
pip download -r requirements.txt | |
#rsync pipdep folder to target vm |
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 | |
torrentId=$1 | |
torrentName=$2 | |
torrentPath=$3 | |
mailBin=/usr/bin/mail | |
subject="[$HOSTNAME] Deluge finished" | |
body="File ${torrentPath}/${torrentName} is downloaded" |
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
[void][Windows.Networking.Connectivity.NetworkInformation, Windows, ContentType = WindowsRuntime] | |
#Task Scheduler on a event : | |
# Log : Microsoft-Windows-NetworkProfile/Operationel | |
# Source : actions_connection_event.ps1 | |
# Event ID : 10000 | |
# Action : powershell.exe C:\Scripts\actions_connection_event.ps1 | |
# Condition : unselect !"Start the task only if the computer is on AC power" |
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
[void][Windows.Networking.Connectivity.NetworkInformation, Windows, ContentType = WindowsRuntime] | |
$cost = [Windows.Networking.Connectivity.NetworkInformation]::GetInternetConnectionProfile().GetConnectionCost() | |
$cost.ApproachingDataLimit -or $cost.OverDataLimit -or $cost.Roaming -or $cost.BackgroundDataUsageRestricted -or ($cost.NetworkCostType -ne "Unrestricted") |