Privacy Policy
Snippets index

  Tools for Windows

WSL: Windows Subsystem for Linux Installation Guide for Windows 10

To install from PowerShell:

wsl --install

See:

https://docs.microsoft.com/en-us/windows/wsl/install-win10

Karabiner (on Mac)

https://karabiner-elements.pqrs.org/

How would I remap Mac CMD to CTRL keys in Remote Desktop Connection for Mac application?

  • Go to the Complex Modifications tab
  • click Add rule at the bottom
  • click Import more rules from the internet
  • click Application Specific
  • find the one that says Remote Desktop and click Import.
  • Once it's imported, you'll see it in the list and just click Enable.

Worked right away for me and only in the Remote Desktop app which is perfect. Didn't even have to restart the app or anything.

Cmder

http://cmder.net/

DevOps Box: CentOs 7 container with common devops tools

https://hub.docker.com/r/perem/perem_devopsbox/

Permanently Disable Windows Defender Real Time Protection on Windows 10

https://www.youtube.com/watch?v=n92Oxh-ktNA&ab_channel=HOWZA

  1. Disable Real Time Protection

  2. then, add this Registry Key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection\DisableRealtimeMonitoring (DWORD, 0x0001)
    

How to Enable OpenSSH Server in Windows 10

https://winaero.com/enable-openssh-server-windows-10

then run manually the server:

> sshd -d

Setting up OpenSSH for Windows using public key authentication:

https://stackoverflow.com/questions/16212816/setting-up-openssh-for-windows-using-public-key-authentication#50502015

Setup permissions properly (important!!!):

Run start . to open explorer with the current folder ($env:USERPROFILE\.ssh);

Right click authorized_keys, go to Properties -> Security -> Advanced

Click "Disable inheritance";

Choose "Convert inherited permissions into explicit permissions on this object" when prompted;

(really, really important) Remove all permissions on file except for the SYSTEM and yourself.
There must be exactly two permission entries on the file.
Some guides suggest running the Repair-AuthorizedKeyPermission $env:USERPROFILE\.ssh\authorized_keys -
this will try to add the sshd user to the permission list and it will break the authentication,
so, don't do that, or at least do not agree on adding the sshd user).
Both SYSTEM and yourself should have full control over the file.

If your Windows build is 1809 or later, it is required to comment out the following lines
in C:\ProgramData\ssh\sshd_config file. Then restart the sshd service.

# Match Group administrators
#       AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys

Configuring bash as the default shell for OpenSSH in Windows (INTERFERES WITH MUTAGEN):

Registry "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\OpenSSH\DefaultShell" --> "C:\ProgramData\cmder.cmd"

C:\ProgramData\cmder.cmd:
    cmd /k C:\cmder\vendor\init.bat

as explained here:

https://github.com/cmderdev/cmder/issues/2425

How to Disable Specific Windows Key Shortcut in Windows

"HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvancedDisabledHotkeys"

https://www.top-password.com/blog/disable-specific-windows-key-shortcut/

Working with pdbpp

Sample file "~/.pdbrc.py":

import readline
import pdb

class Config(pdb.DefaultConfig):

    sticky_by_default = True
    # editor = 'e'
    # stdin_paste = 'epaste'
    #filename_color = pdb.Color.lightgray
    current_line_color = 40  # black
    #use_terminal256formatter = False
    highlight = True

To remove unwanted empty lines in the sticky output, Add the following setting in the registry:

[HKEY_CURRENT_USER\Console]
"VirtualTerminalLevel"=dword:00000001