June 10, 2022

Redirect Youtube Shorts to Normal Viewer

Youtube shorts redirect to normal viewer


Problem: Desktop view of youtube.com shorts uses a new video format which is annoying, automatically loops and harder to comment on.

Solution:
Firefox or Chrome extension prerequisite: “Redirector” by Einar Eglisson. https://einaregilsson.com/redirector/
Note: It may require browser restart to function properly.

Settings:




Description: Youtube redirect shorts to normal view
Example URL: https://www.youtube.com/shorts/946r7dXI4e4
Redirect: https://www.youtube.com/shorts/*
to: https://www.youtube.com/watch?v=$1
pattern: wildcard

See my earlier tip for redirecting youtube searches to sorted results:
https://steronius.blogspot.com/2021/09/youtube-search-sort-newest-first.html


as always, good luck!


Please consider crypto tipping:
  

January 26, 2022

Basic VmWare DataStore Stats

Get Basic VMWare DataStore Statistics via PowerShell PowerCLI

Big thanks to LucD, and this post which is essentially the entire solution: https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-script-to-get-DatastoreCluster-Datastores-and-the-size/td-p/1301104

Problem: I need stats on datastores. Specifically, i need to find which DataStores are over-provisioned compared to the VM’s assigned to it.

Solution:

[CmdletBinding()]
param(
[Parameter(Mandatory=$True,Position=0,HelpMessage="The script will output to .CSV datastore statistics for the provided vCenter Server hostname or FQDN")]
[string]$vCenter
)
Import-Module VMware.VimAutomation.Core | Out-Null
try {
Connect-VIServer -Server $vCenter -Protocol https -Force -ErrorVariable err -ErrorAction SilentlyContinue | Out-Null
} catch {
Out-Null
} finally {
if ($err.Count -eq 0) {
Write-Output "Fetching DataStore statistics..."
$datastores = get-datastore
$report = foreach ($store in $datastores) {
$store | Select @{N='Datacenter';E={$_.Datacenter.Name}},
@{N='DSCluster';E={Get-DatastoreCluster -Datastore $_ | Select -ExpandProperty Name}},
Name,CapacityGB,@{N='FreespaceGB';E={[math]::Round($_.FreespaceGB,2)}},
@{N='VMCount';E={$_.ExtensionData.VM.Count}},
@{N='ProvisionedSpaceGB';E={[math]::Round(($_.ExtensionData.Summary.Capacity - $_.Extensiondata.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted)/1GB,2)}},
@{N='UnCommittedGB';E={[math]::Round($_.ExtensionData.Summary.Uncommitted/1GB,2)}},
@{N='FreeGB/CapacityGB %';E={[math]::Round(($_.FreespaceGB/$_.CapacityGB)*100,2 -f 000.00)}},
@{N='ProvisionedGB/CapacityGB %';E={[math]::Round(($_.ExtensionData.Summary.Capacity - $_.Extensiondata.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted)/$_.CapacityGB/1GB*100,2 -f 000.00)}}
}
$report | Sort-Object -Property 'ProvisionedGB/CapacityGB %' | Export-Csv datastore-stats.CSV -NoTypeInformation -UseCulture
ls datastore-stats.CSV
disconnect-viserver -Confirm:$false
} else {
Write-Output "failed to connect to ${vCenter}. Exiting."
Exit
}
}

The script will output to .CSV file sorted by ProvisionedGB/CapacityGB percentage.

As such, you may see which datastore are heavily over-provisioned (in the sense of datastore larger than necessary).
Of course, you may also sort my other columns as needed.




Please consider crypto tipping: