Skip to content

Instantly share code, notes, and snippets.

@amit-g
amit-g / IncreraseVideoPlaybackSpeedOnMicrosoftStream.js
Last active December 15, 2022 17:45
Increrase video playback speed on microsoft stream
// ==UserScript==
// @name Increase Playback Speed on Microsoft Stream
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.sharepoint.com/sites/*/stream.aspx?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// ==/UserScript==
Steps of restart app service by the REST API:
• Open URL: https://resources.azure.com/raw/
• Past the command from below(Please double verify the value in the highlight part):
POST https://management.azure.com/subscriptions/XXXXXXa/resourceGroups/XXXX/providers/Microsoft.Web/serverfarms/XXX1/workers/RD0003FF85D409/reboot?api-version=2021-02-01
@amit-g
amit-g / DNS-Resolution-Troubleshooting
Created June 3, 2021 17:45
DNS-Resolution-Troubleshooting
ipconfig /all
Get-NetIPInterface | Sort-Object InterfaceMetric
Get-DnsClientServerAddress
Resolve-DnsName google.com
@amit-g
amit-g / EnableDisable-TLS.ps1
Last active September 21, 2022 00:18
Enable Disable TLS
###Test
(New-Object System.Net.WebClient).DownloadString("https://www.google.com")
###View configured protocols
dir 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols' -Recurse
###Disable TLS1.0
New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server' -name 'Enabled' -value '0' -PropertyType 'DWord' -Force | Out-Null
New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server' -name 'DisabledByDefault' -value 1 -PropertyType 'DWord' -Force | Out-Null
# Query Active Directory for computers running a Server operating system
$Servers = Get-ADComputer -Filter { OperatingSystem -like "*server*" }
# Loop through the list to query each server for login sessions
ForEach ($Server in $Servers) {
$ServerName = $Server.Name
# When running interactively, uncomment the Write-Host line below to show which server is being queried
Write-Host "Querying $ServerName"
@amit-g
amit-g / DownloadPodcasts.ps1
Last active November 12, 2019 07:50
Reads the Podcast Feed and Downloads the Podcasts
$FeedUrl="ValidFeedRssUrl"
$FeedResponse=Invoke-WebRequest $FeedUrl
$FeedXml=[xml]$FeedResponse.Content
$FeedXml.rss.channel.item |
Select-Object @{ L="PubDate"; E={ [DateTime]::ParseExact($_.pubDate.Substring(0, $_.pubDate.Length - 3) + "GMT", "R", $null) } }, @{ L="Uri"; E={ [Uri]$_.guid } } |
Select-Object @{ L="LocalName"; E={ $_.PubDate.ToString("yyyy-MM-dd-") + [Uri]::UnescapeDataString($_.Uri.Segments[$_.Uri.Segments.Length - 1]).Replace(" ", "_") } }, PubDate, Uri |
Select-Object -First 2 |
% { if (! (Test-Path $_.LocalName)) { echo "Downloading $($_.LocalName)"; "Start-BitsTransfer -Source $_.Uri -Destination $_.LocalName; Sleep 10;" } else { echo "$($_.LocalName) already downloaded" } }
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"Enabled"=dword:ffffffff
"DisabledByDefault"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:ffffffff
"DisabledByDefault"=dword:00000000
# https://www.tenforums.com/tutorials/6815-network-location-set-private-public-windows-10-a.html
# net view
Get-NetConnectionProfile
$NetConnProfile = Get-NetConnectionProfile
Set-NetConnectionProfile -Name $NetConnProfile.Name -NetworkCategory Private
@amit-g
amit-g / BoxstarterWindows10.txt
Last active March 28, 2023 19:54
BoxstarterWindows10.txt
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
Get-PackageProvider Chocolatey
#####
Install-Package -Name slickrun -Force
# Install-Package -Name fiddler4 -Force
@amit-g
amit-g / Boxstarter.txt
Last active March 28, 2023 19:53
Boxstarter
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
# Get-PackageProvider Chocolatey
#####
choco install slickrun -y
# choco install fiddler4 -y