Skip to content

Instantly share code, notes, and snippets.

@AnanthaRajuC
Created November 11, 2020 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnanthaRajuC/d4fd323fd0a30c496580136b81c9cde6 to your computer and use it in GitHub Desktop.
Save AnanthaRajuC/d4fd323fd0a30c496580136b81c9cde6 to your computer and use it in GitHub Desktop.
Windows 10 Setup

Windows 10 Pro Setup Notes

based on original document from Alan Stevens

Installation

IMPORTANT:

  • Install using Local Account first, attach Microsoft account later

Installation

System Updates:

  • Settings -> Update & Security
  • Install all updates

Visual Studio 2017:

  • Community Edition is free.
  • Download and run the installer
  • Select the following workloads:
    • ASP.NET and web development
    • .NET Core cross-platform development
    • Desktop development with C++ (for the compiler tools)
  • On startup, choose the Web Development (code only) profile and dark for the theme.

SQL Server 2017 Developer Edition:

  • Download and install
  • Just install database engine services
  • Mixed mode. Add Administrators group and current user to server administrators.
  • must be installed before SQL Server Management Studio

Windows Bash:

  • Run OptionalFeatures.exe
  • Scroll to bottom, select Windows Subsystem for Linux
  • Click OK (system will reboot)
  • Open cmd.exe and type bash
  • Follow the link in the output to install a Linux distro. I use Ubuntu.
  • Once it is installed. Click Launch in the app store window to set up your console. This will take a while.
  • Enter a username and password.

Powershell Execution Policy:

  • launch Windows Powershell as administrator and execute:
  • Set-ExecutionPolicy Unrestricted
  • Enter A to accept all changes

Chocolatey:

  • To install Chocolatey, follow the instructions here.
  • Restart your console (as administrator) to take advantage of the updated path.
  • Set Chocolatey polices (prevents a prompt for each package):
choco feature enable -n allowGlobalConfirmation  
choco feature enable -n allowEmptyChecksums
  • Install Chocolatey packages:
choco install googlechrome sql-server-management-studio visualstudiocode python3 make cmake ctags curl dotnet3.5 windirstat ccleaner nodejs-lts 7zip.install paint.net grepwin p4merge postman dotnetcore sourcetree jetbrains-toolbox sharpkeys conemu poshgit oh-my-posh redis-desktop-manager robot3 filezilla firecode slack evernote dropbox composer php cmder f.lux jdk8 rabbitmq erlang SourceCodePro sublimetext3 vagrant wget wkhtmltopdf zeal 

** Install yarn with nodejs-lts

choco install yarn --ignore-dependencies
  • You can close the prompt from SourceTree after it is installed.

  • If a package fails to install:

    • try choco install -f <packagename>
    • if that fails, check under %temp%\chocolatey for the installer and, if found, run it from there.

Git

  • Install git manually to select custom settings
  • De-select "Windows Explorer Integration"
  • Select "Use Git and optional Unix tools from the Windows Command Prompt"
  • Select "Checkout as-is, commit Unit style line endings"

WSl Git for Docker development under WSL

  • Install git from source (same version as windows)
  • Check git version git --version
  • Install build deps sudo apt update && sudo apt install -y make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
  • Checkout the git with specific version git clone git@github.com:git/git.git git-source cd git-source && git checkout v2.18.0
  • Make && Install make prefix=/usr/local all && sudo make prefix=/usr/local install
  • Clean up sudo rm -rf git-source

Powershell

  • In an administrator prompt:
  • Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
  • Install-Module Get-ChildItemColor
  • Install-Module PSReadLine

Oh My Posh

Install-Module posh-git Install-Module oh-my-posh

  • Setup ohmyposh profile if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force } notepad $PROFILE

  • Append the following lines to the profile file Import-Module posh-git Import-Module oh-my-posh Set-Theme Agnoster

SQL Server Operations Studio

Download

Configuration

Install a code font:

  • Install a font from Nerd Fonts
  • I use Hack (Hack Regular Nerd Font Complete Mono.ttf)

Set Command Window Color Scheme

Replace the Cmder - ConEmnu with the latest version

  • Download the latest .7z build from Github
  • Copy the extract files and paste into the Cmder->vendor->conermu-maximus5

Configure ConEmu

  • In settings -> features -> colors
  • In the schemes field, type IR_Black
  • Click save.
  • Edit %appdata%\ConEmu.xml
  • Search for IR_Black
  • Replace ColorTable00 through ColorTable15 with the lines found below:
  • IR_Black color scheme
  • Alternately, replace the entire contents of ConEmu.xml with this: ConEmu.xml

Caps Lock Not necessary in Parallels

  • Launch SharpKeys
  • Map Caps Lock (00_3A) to Escape (00_01)
  • Click "Write to Registry"
  • Reboot

Remove OneDrive

  • Control Panel -> Programs and Features -> Microsoft OneDrive -> uninstall
  • Execute the following from an administrator command prompt:
rd "%UserProfile%\OneDrive" /Q /S
rd "%LocalAppData%\Microsoft\OneDrive" /Q /S
rd "%ProgramData%\Microsoft OneDrive" /Q /S
rd "C:\OneDriveTemp" /Q /S
REG Delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG Delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
  • Reboot

Disable hibernation and remove hiberfil.sys

  • In an admin console: powercfg -h off
  • Reboot

Remove pagefile.sys

  • Run sysdm.cpl
  • Select the Adanced tab
  • Click the Settings... button under Performance.
  • Select the Advanced tab
  • Under Virtual Memory, click Change
  • Uncheck Automatically manage paging file size for all drives
  • Set all drives to No paging file
  • Click OK until Windows suggests restarting
  • After restarting you can safely delete pagefile.sys

set git config defaults:

  • git config --global user.name "Li Tan"
  • git config --global user.email "litan1107@gmail.com"

Registy files:

Rename This PC

  • In Explorer, on the left, right-click "This PC" and select properties.
  • On the right, under Computer name, domain and workgroup settings, click Change settings
  • On the bottom right, click change
  • Enter your new computer name
  • click ok and reboot

Taskbar:

  • Unpin all icons from taskbar except Explorer & Task View
  • right click on taskbar:
    • Cortana -> hidden
    • uncheck Show People Button
    • uncheck Show Windows Ink Workspace Button
    • Taskbar Settings -> combine taskbar buttons: when taskbar is full

Desktop

  • right click on the desktop -> view -> uncheck show desktop icons

Start Menu

  • right click on every modern app on the start menu and choose unpin from start
  • resize start menu to minimum width
  • Settings -> Personalization -> Start ->
    • Show recently opened items...: off

Explorer:

  • View
    • Details
    • filename extensions
    • hidden items
  • View -> Options -> General
    • uncheck Show frequently used files in Quick access and Show frequently used folders in Quick access
    • open file explorer to: This PC
  • View -> Options -> View
    • uncheck hide protected operating system files
    • navigation pane (scroll to bottom) -> expand to open folder
    • DO NOT: navigation pane -> show all folders
    • click: Apply to Folders
  • Quick Access (top left)
    • unpin all folders except desktop and Downloads

Control Panel:

  • View By: Large Icons

Reverse scroll wheel:

  • Not needed in Parallels
  • Settings -> Devices -> Mouse & touchpad, Reverse Scrolling Direction
  • If no touch pad do this

Install configuration files from DropBox:

  • copy .ssh folder from DropBox to %userprofile%
  • copy .gitconfig to %userprofile%

Application Configuration

SourceTree:

  • Tools -> Options: set the project folder to %userprofile%\Development
  • Tools -> Options -> Authentication: Add your GitHub and Bitbucket accounts

VSCode

  • Use Settings Sync
  • Install the required extensions
  • Update Setting.json to use cmder
"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/k", "%CMDER_ROOT%\\vendor\\init.bat"],
  • *need a system environment variable for CMDER_ROOT

Notepad++

  • Install the xml tools plugin
  • settings -> Style Configurator:
    • Select Obsidian from the drop down
    • Select Hack Nerd Font Mono from the font list
    • Font Size: 12
    • Enable global font
    • Enable global font size
    • Enable global foreground color
    • enable global background color

Visual Studio 2017

Settings:

Tools -> Options:

  • Environment:

    • Fonts & Settings: Font: Hack NF, Size: 16
    • Startup -> At Startup: Show Empty Environment
    • General -> Color Theme: Dark
    • General -> Apply title case styling to the menu bar (should be on by default)
  • Projects and Solutions:

    • Locations -> Projects Location: %userprofile%\Development\
    • track active item in solution explorer
  • Debugging -> General -> uncheck: Enable Just My Code

  • Source Control -> Plug-in selection: git

  • Text Editor -> All Languages:

    • General:
      • uncheck: hide advanced members
      • check: line numbers
      • uncheck: navigation bar
    • Tabs:
      • Indenting: Smart
      • Tab Size: 4
      • Indent Size: 4
      • check: Insert Spaces
  • Install ir_black color scheme

    • download: ir_black theme https://studiostyl.es/schemes/ir-black
    • Tools -> Import and Export Settings -> Import Selected Environment Settings -> Next -> No, just import new settings -> Next -> Browse to file -> open -> next -> finish
  • Stop VS from opening the start page after a solution is closed:

    https://stackoverflow.com/questions/42701902/how-to-disable-start-page-after-solution-close-in-visual-studio-2017/44598030#44598030

Extensions:

Tools -> Extensions and Updates:

  • ILSpy

  • Visual Studio Spell Checker

  • VsVim

    • tools -> options -> vsvim:
      • defaults -> general
      • VimRc Error Reporting: true
      • VimRc File Loading: vsvimrc files only
      • keyboard
        • Handle all with Visual Studio
        • ctrl+d: Handled by VsVim
        • ctrl+u: Handled by VsVim
      • Copy _vsvimrc to %userprofile%.
  • Productivity Power Tools

    • tools -> options -> Productivity Power Tools:
      • Custom Document Well
        • sometimes the general settings don't save if you move to the next screen. Hit ok after changing these settings and come back to options to finish.
        • General -> Tab Appearance: uncheck Color tabs by project
        • General -> Sorting: uncheck all
        • Advanced -> Colors and Gradients: uncheck Automatically select tab text colors
        • Advanced -> Colors and Gradients: uncheck Force flat custom colors
      • Power Commands -> Commands
        • disable (uncheck) all
        • enable Fix Mixed Tabs
        • enable Edit Project File
        • enable Open containing folder
        • enable Open command prompt
        • enable Reload Projects
        • enable Unload Projects

Resharper 2017

  • Log in to JetBrains.com to get a license key, or simply log in to your JetBrains account when Resharper prompts you for a license

Settings:

Resharper -> Options:

  • Environment

    • General
      • Application icons theme: gray
      • Source code symbols theme: gray
    • Keyboard & Menus
      • Keyboard Shortcuts: Resharper 2.x or IntelliJ IDEA
    • Editor
      • Editor Appearance:
        • Highlight current line
        • Highlight matching delimiters when caret is: at both sides
  • Code inspection

    • Inspection severity
      • C#: collect these as they are edited on the fly
  • Code Editing -> C#:

    • Naming Style

      • Constant fields (private): ALL_UPPER
      • Constant fields (not private): ALL_UPPER
    • Formatting Style

      • Braces Layout -> Empty Braces Formatting: Together on the same line
      • Line Breaks and Wrapping -> Break line in a block with a single statement: Force put on single line
      • Blank Lines -> Keep max blank lines in code: 1
      • Blank Lines -> Keep max blank lines in declarations: 1
      • Line Breaks and Wrapping -> Prefer wrap before operator in binary expression: check for true
      • Line Breaks and Wrapping -> Place simple property/indexer/event declaration on a single line: check for true
      • Line Breaks and Wrapping -> Place simple method on single line: check for true
      • Line Breaks and Wrapping -> Place field attribute on same line: uncheck for false
      • Line Breaks and Wrapping -> Place simple array, object and collection on single line
      • Other -> Don't indent comments started at first column: uncheck for false
    • file layout :

      constructors
      fields
      static fields and constants
      properties
      public delegates
      all other members
      nested types
      public enums
      
  • Tools

    • External Sources: Navigation to Object Browser Import Live Templates
  • Resharper -> Tools -> Templates Explorer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment