Visual Studio Code Shortcuts

Note: The following keys are rendered assuming a standard US keyboard layout. If you use a different keyboard layout, please read below. You can view the currently active keyboard shortcuts in VS Code in the Command Palette (View -> Command Palette) or in the Keyboard Shortcutseditor (File > Preferences > Keyboard Shortcuts). Some commands included below do not have default keyboard shortcuts (unassigned) but you can assign your own keybindings....

November 3, 2021 · 5 min · Mark

Multiple Symbolic Links Windows

Create a batch file, for example: symlink.bat with the following content and edit the source and target locations to suit. @echo off set "source=c:\source\directory" set "target=c:\target\directory" set "exclude=%temp%\exclude.txt" ( rem exclude files/dires with these strings into full path echo .txt echo pipe.cmd rem escaped backslash and initial and final quotes to avoid partial matches echo "c:\\source\\directory\\something.txt" rem exclude thisNot file/directory from source directory echo "%source:\=\\%\\thisNot" )> "%exclude%" forfiles /P "%source%" /C "cmd /c (echo @path|findstr /i /v /g:"%exclude%" >nul) && if @isdir==TRUE (mklink /d \"%target%\\\"@file @path) else (mklink \"%target%\\\"@file @path)" del "%exclude%" > nul Original answer posted on: stackoverflow

November 2, 2021 · 1 min · Mark

Change Mac Machine Name via Terminal

I needed to change the name of one of my Macs remotely and this is the command to do it: sudo scutil --set HostName [NewHostNameHere]

October 22, 2021 · 1 min · Mark

SSH copy keys from Windows

I have recently been setting up an old Mac Mini as Webserver and NAS server. One of the things I wanted to do was enable ssh key pair login and wonderd how one used ssh-copy-id on a Windows machine to get the public key from a local machine to the server. It turns out you can’t but the cat command can do it just fine. Here is the template: C:\Users\<user>\.ssh\id_rsa.pub | ssh <user>@<remoteserver> cat >> ....

October 22, 2021 · 1 min · Mark