Skip to content

Instantly share code, notes, and snippets.

View zsoumya's full-sized avatar

Soumya Mukherjee zsoumya

  • Charlotte, NC
  • 22:33 (UTC -12:00)
View GitHub Profile
@zsoumya
zsoumya / filters.txt
Last active September 17, 2023 23:47
My AdBlock Plus Filters
##div[style*="z-index: 300000"]
##a[data-test-id="pencil-ad-messageList"]
##a[data-test-id="pencil-ad-messageList2"]
kingston.com##div#email-signup-modal
codeshare.io##div.sp-footbar
yahoo.com##div[data-test-id="mail-right-rail"]
@zsoumya
zsoumya / mc.ps1
Created April 2, 2021 04:15
Movie Count By Source
$sources = @(
'F:\Movies\720p',
'F:\Movies\Bengali',
'F:\Movies\Ero',
'F:\Movies\Indian',
'F:\Movies\LQ',
'H:\Movies\1080p',
'H:\Movies\Collections',
'H:\Movies\Unwatched2',
'J:\Movies\4K',
@zsoumya
zsoumya / GCF.cs
Created March 25, 2021 05:24
GCF of any set of numbers
void Main()
{
FindGCF(154875, 137688, 182664).Dump();
}
int FindGCF(params int[] nums)
{
return nums.Aggregate((result, num) => GCF(result, num));
}
@zsoumya
zsoumya / readme.md
Last active July 27, 2022 00:27
Windows Setup and Customization Guide for New Installs

Windows Setup and Customization Guide for New Installs

  • Go to Bluetooth settings and add mouse (Logitech Master 2S is my current mouse)
  • Logitech Options will ask to be auto-installed. Allow.
  • Log into Logitech Options with the Logi account.
  • Go to mouse profile and configure the middle button.

  • Go to Windows Activation settings.
  • Click Troubleshoot.
  • Windows will auto-detect edition upgrade (Windows 10 Pro For Workstations) and reboot.
@zsoumya
zsoumya / fix-wsl2-dns-resolution
Created November 9, 2020 07:44 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away
[network]
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file.
6. Put the following line in the file
@zsoumya
zsoumya / readme.md
Last active June 16, 2021 09:41
Docker Cheat Sheet

Docker Cheat Sheet

Stop all containers

docker container stop $(docker container ls -aq)

Remove all containers

docker container rm $(docker container ls -aq)

@zsoumya
zsoumya / PathIterator.rb
Last active August 6, 2020 21:59
Path Iterator In Ruby
def list_files(path, level)
if File.directory?(path)
Dir.foreach(path) do |item|
if item != '.' && item != '..' && item != '$RECYCLE.BIN' && item != 'System Volume Information'
item = File.join(path, item)
size = File.size(item)
if File.directory?(item)
print("#{"\t" * level}#{item}\n")
@zsoumya
zsoumya / ConEmu.xml
Last active April 12, 2020 17:08
ConEmu Configuration XML
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2020-04-12 13:06:26" build="191012">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::PowerShell (Admin)}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@zsoumya
zsoumya / ShouldContinueVsShouldProcess.ps1
Created March 9, 2020 02:34
ShouldContinue vs ShouldProcess
function Test-SupportShouldProcess {
[CmdletBinding(SupportsShouldProcess)]
param(
[switch]$force
)
# Use this to prompt the user by default. Use -Force to disable prompting.
# NOTE: that you have to add the $force parameter yourself, as shown above. It doesn't even have to be
# named $force. How you implement this is up to you.
if ($force -or $PSCmdlet.ShouldContinue("Some resource", "Would you like to continue?") ) {
@zsoumya
zsoumya / fixchrome.cmd
Created July 24, 2019 20:39
Fix Disabled Chrome Sync and Disabled Incognito Mode
reg delete HKLM\SOFTWARE\Policies\Google\Chrome /v SyncDisabled /f
reg delete HKLM\SOFTWARE\Policies\Google\Chrome /v IncognitoModeAvailability /f
reg delete HKLM\SOFTWARE\Policies\Google\Chrome /f
reg delete HKLM\SOFTWARE\Policies\Google /f