Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name ChessboardsPrinting
// @namespace http://www.chess.com
// @description Adds a PRINT CHESSBOARDS button to Chess.com for chessboards printing
// @include http://www.chess.com/*
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @grant none
// ==/UserScript==
// ==UserScript==
// @name EnchantedLearningPuzzles
// @namespace http://www.enchantedlearning.com
// @include http://www.enchantedlearning.com/*/*/puzzles/*
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// ==/UserScript==
(function () {
run();
// ==UserScript==
// @name GithubRun
// @namespace http://www.github.com
// @description Adds a Live Run button to Github.com source files
// @include https://github.com/*/*
// @version 1
// @require
// @grant none
// ==/UserScript==
@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
@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
# 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
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
@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" } }
# 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 / 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