Skip to content

Instantly share code, notes, and snippets.

@OutOfThisPlanet
OutOfThisPlanet / DesktopBackground.ps1
Last active August 17, 2024 01:41
Download day / night image from timeanddate.com to set as desktop background
Invoke-WebRequest -UseBasicParsing -Uri "https://www.timeanddate.com/scripts/sunmap.php?iso=$(Get-Date -Format yyMMddThhmm)&earth=1" |
Select-Object -Expand Content |
Set-Content -Path 'TEMP.jpg' -AsByteStream -Force
Copy-Item -Path 'TEMP.jpg' -Destination 'SetThisAsDesktopPicture.jpg' -Force
#Manually set your desktop background to 'SetThisAsDesktopPicture.jpg'
#Set scheduled task / cron job to make this run every minute.
{
"type": "indicator",
"name": "indicator:PVSRA",
"data": {
"options": {
"priceScaleId": "pvsra",
"blueVectorColor": "rgba(42,32,223,0.47)",
"greenVectorColor": "rgba(38,218,44,0.5)",
"redVectorColor": "rgba(255,0,0,0.5)",
"regularCandleDownColor": "rgba(60,60,60,0.5)",
@OutOfThisPlanet
OutOfThisPlanet / Get-FileInformation.ps1
Last active November 21, 2021 15:45
Get the Creation Date information from office files, Sent / Received Date from outlook emails. UK Date format.
Function Get-FileInformation # This function will gather date information and other properties about a file
{
param([string]$LiteralFilePath) # Target is the full path to a file
$Target = $LiteralFilePath
$Directory = ($Target -replace '[^\\]*$')
#region Filetypes
#region Outlook
if (
$Target -like "*.msg" # Handle Outlook Files (Has to open OutLook to get sent and received dates)
)