Skip to content

Windows

Created: 2015-12-20 19:48:23 -0800 Modified: 2020-06-01 10:21:37 -0700

  • Put shortcuts in %userprofile% named after a single letter. For example, I usually put a shortcut to MSPaint or paint.net as “m”, Notepad as “n”, CMD as “c”, Sublime as “s”, etc.
  • Quick Access Toolbars are in most programs with ribbons (e.g. Office, Explorer, OneNote). You can right-click most toolbar options and add them to the QAT, then alt+# will access them.
    • Also, when a ribbon is pinned, scrolling (via the scroll wheel) while hovering above the ribbon will change pages.
  • Disable “get tips, tricks, and suggestions as you use Windows” so that you don’t get as many nag dialogs (reference)
  • If you see a notification pop up that you don’t want, right-click it and disable notifications from that particular app. This happened to me when I got a notification like “bored with your current background picture?” I clicked the notifications at the bottom right of the taskbar, then disabled the particular notification.
  • Disable “occasionally show suggestions in Start” in Settings —> Personalization —> Start so that you don’t get ads in the start menu

for /d /r . %d in (node_modules) do @if exist “%d” rmdir /s/q “%d”

Note: you may want to test this first by changing “rmdir” to “echo”. Also, if run from within a file, you need two % signs in each case.

Upload a file via FTP (with WinSCP)

Section titled Upload a file via FTP (with WinSCP)

:: If you want logging, add “/log=upload.log” before “/command”

start "" “C:Program Files (x86)WinSCPWinSCP.exe” /command ^

“open sftp://USER:PASSWORD @DOMAIN/” ^

“put ""./path/to/source"" ""/home/foo/public_html/dest/index.html""" ^

“exit”

  • Win+period: EMOJI MENU

10/7/2016

This is really only useful for streaming since I like the new alt+tab stylistically, but it shows windows from both monitors.

  1. HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorer
  2. New 32-bit DWORD “AltTabSettings” which you set to 1.
  3. Restart Explorer.

12/20/2015

To delete trusted certificates (so that you no longer trust them):

  • Open certmgr.msc (which is an MMC snap-in, so if you wanted, you could load MMC and then add the Certificates snap-in)
    • Just run System32certmgr.msc
  • Look for your certificates, which are probably either under Personal or Trusted Root Certification Authorities

Note: the reason I wanted to do this is because I was streaming my development on Twitch, and I’d added a certificate to my trusted certs, but I may or may not have shown the private key on-air. If someone else used that, they could probably create a site that my computer would trust. It’s far-fetched, but anyway, it doesn’t hurt to delete unused self-signed certificates.

To use “findstr” to search for something but EXCLUDE a certain directory, I found it was best to use the “/V” switch, which means to not print something containing a string. Note that this is not identical to excluding directories:

findstr /snip “some text” *.js | findstr /V “node_modules”

To flush your DNS cache, do “ipconfig /flushdns”.

You can use “ping <domain name>” to figure out what’s currently in the cache and “nslookup” to figure out the non-authoritative answer.

(does not require elevation):

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

Summary:

  1. “powercfg -lastwake” from CMD to figure out what process is responsible.
  2. Open Event Viewer and filter Windows Logs —> System —> “Power-TroubleShooter” source.

Disabling a bunch of built-in garbage

Section titled Disabling a bunch of built-in garbage

Disable the “Connected User Experiences and Telemetry” service, stop it, and kill any tasks associated with it. It was taking up too much of my hard drive cycles.

This is actually super useful as a quick command rather than using Explorer.exe. It visually shows a folder structure (and potentially files with “tree /f”).

D:CodeBotLandbot-landclientpublicjavascripts >tree

Folder PATH listing

Volume serial number is 000000AD 72FB:1E11

D:.

├───ecs

├───react_and_redux

│ ├───actions

│ ├───components

│ │ ├───account

│ │ ├───hoc

│ │ ├───landingnavlog

│ │ └───scripts

│ ├───containers

│ ├───reducers

│ └───store

└───vendor

You can mirror a source directory using robocopy

robocopy <source> <dest> /MIR /FFT /Z /XA:H /W:5

Explanation of args:

/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

/FFT :: assume FAT File Times (2-second granularity).

/Z :: copy files in restartable mode.

/XA:H :: exclude hidden files

/W:5 :: wait 5 seconds between retries

If you need the real rsync, you can use it from WSL

[10:59] maddosaurus: @Adam13531 Next time you need a Linux binary in Windows: You can call every WSL binary directly from CMD/Powershell (wsl <LinuxCommand>)

Just copy/pasting from the references:

  1. open control panel

  2. type color in the search bar and click on the green color management link

  3. in the dialog that appears tick the box under your monitor name which says “use my settings for this device”

  4. click on the add button

  5. There will appear a list of color profiles. You want to select sRGBIEC611966-2.1 and click ok

  6. click on the set as default profile button and then close button

Repeat this procedure for each monitor you may have.

I did two things, but I’m not sure which one might have fixed it:

  1. Set this on both the client and the server
    1. Start an elevated command prompt and run: netsh int tcp set global autotuninglevel=highlyrestricted (reference). The reference says you need to reboot (and I didn’t), so perhaps this isn’t what solved it.
  2. From the client, go to options and set the display quality to 15-bit instead of the highest one.

It may have just been Internet lag since it hit me while I was connected even though it had been working fine for at least 10 minutes.

I set “git.autofetch” to false in Visual Studio Code.

Arrow keys are controlling the mouse

Section titled Arrow keys are controlling the mouse

This is either caused by a built-in feature called “Mouse Keys”, which you can disable by searching for it through the settings, or it’s caused by MSPaint (reference), which you can disable by closing the program.