Category: Uncategorized

  • How to Download all Videos from a Playlist of a YouTube Channel

    First of all, get hold of the command line app yt-dlp. And then locate the playlist’s URL, usually, it looks something like: https://www.youtube.com/playlist?list=PLHRPVO3iI3UuJOfesVfvaJf4F9DKteewJ Last, but not least, kick off a command line terminal window (either Windows or Linux) and execute the below command: yt-dlp -i –yes-playlist https://www.youtube.com/playlist?list=PLHRPVO3iI3UuJOfesVfvaJf4F9DKteewJ  

  • Play YouTube When Screen is Locked on Android Phone (Without Paying for YouTube Premium)

    This is a legitimate requirement, for example, when I only need to listen to the audio track of a YouTube video while placing my phone in my pocket during commute hours. Typically, if you don’t pay YouTube Premium membership, you don’t have this “play in the background” feature on your YouTube app. And now there…

  • How to fix a jumpy scroll wheel on your mouse

    My ergonomic/vertical mouse recently started to give me headaches as when I used the scroll wheel, the scroll bar often goes the opposite direction. I found below a simple hack of placing a tiny bit of paper into the encoder extremely helpful. Shoutout to below video creator and his link here: https://www.youtube.com/watch?v=_JwUUjLzAMY&ab_channel=OrkhanAliyev  

  • Powershell Function to Get Sizes of All Databases on an Instance

    Below is a function that I modified from one in Idera’s SQL Server Powershell Scripts toolset: [sourcecode language=”powershell”] #Function to get sizes of all DB’s hosted on an instance Function Get-SQLDBSizes { param ( [string]$InstaceName = "$(Read-Host ‘Please use format ServerName(IPAddress)\InstanceName’ [e.g. 127.0.0.1\instance])" ) begin { [void][reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") } process { try { Write-Verbose "Connect to…

  • Powershell Function to Get the Last Boot Up Time of a Computer

    [sourcecode language=”powershell” wraplines=”false”] #Return the last reboot time of a computer #Usage: Get-LastBootUpTime [ServerName] Function Get-LastBootUpTime { param ([string]$computername=$env:computername) $computername = $computername.toupper() Get-WmiObject -ComputerName $computername win32_operatingsystem| select csname, @{LABEL=’LastBootUpTime’;EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}} } [/sourcecode]

  • Powershell Function to Get the Windows Version of a Computer

    [sourcecode language=”powershell” wraplines=”false”] #Get Windows version on a specific computer/instance #Usage: Get-WindowsVersion [ServerName] Function Get-WindowsVersion { param ([string]$computername=$env:computername) $computername = $computername.toupper() (Get-WmiObject -ComputerName $computername -Class Win32_OperatingSystem).Caption } [/sourcecode]

  • Powershell Function to Get Statues of All Sql Related Services

    [sourcecode language=”powershell” wraplines=”false”] #Get SQL-related services’ statuses on a specific computer #Usage: Get-SqlServiceStatus [ServerName] Function Get-SQLServiceStatus { param ([string]$ComputerName=$env:computername) Get-Service -ComputerName $ComputerName -Name "*sql*" } [/sourcecode]

  • Powershell Script of Sending an HTML Email Report in a Formatted Table

    This is a re-post from Powershell expert “Ben Wilkinson“, the original ps function is here. I did have some trouble in making it work in my own script and found that I have to add opening and closing “style” tags in the css definition part to make it work. So here I am writing a memo about…