Skip to content

Instantly share code, notes, and snippets.

@CreativeNotice
Last active May 19, 2020 21:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CreativeNotice/ed0a11e6702aa26c9aa014caaced42d6 to your computer and use it in GitHub Desktop.
Save CreativeNotice/ed0a11e6702aa26c9aa014caaced42d6 to your computer and use it in GitHub Desktop.
Ryan's favorite Windows dev setup

Why

Because as developers we establish our workspace over the years to be most comfortable and effecient for ourselves. I've had to reinstall Windows or have gotten a new laptop a few times in the last few years and realize I don't have my favoirite setup and tools documented anywhere.

This is a very opnionated document because it's for myself. If you happen to arrive here, that's cool, leave me some comments if you see an error or have a suggestion, but don't get offened if I don't change my setup. It's personal after all.

From Scratch

Hi Ryan, you're installing from scratch...

First steps

  1. New PC, so make sure you're on the work domain first thing!
  2. Make sure you have local admin account.

Next

  1. Install Chocolatey using PowerShell.

Cmder

  1. Install Cmder using choco install cmder, this will place your favorit console emulator at "C:\tools\cmder".
  2. Install a good patched font from nerd-fonts and make sure it has ligatures.
  3. Follow the instructions here to setup a nice powerline prompt for bash and powershell, similar to Zsh's Agnoster theme.

Cmder Alias

These can be added to C:\tools\Cmder\config\user_aliases.cmd and make your life better.

;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
gl=git log --oneline --all --graph --decorate  $*
gs=git status --short
ga=git add $*
gf=git fetch $*
gb=git branch $*  
gp=git pull $*
gpu=git push
gco=git checkout $*
gcm=git commit $*
ls=ls --show-control-chars -F --color $*
lha=ls -lhA --color $*
~=cd %USERPROFILE% $*
~p=cd %USERPROFILE%\Documents\Projects $*
clear=cls
history=cat -n "%CMDER_ROOT%\config\.history"
unalias=alias /d $1
cmderr=cd /d "%CMDER_ROOT%"
localhost="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" localhost

More Apps

You'll want to use choco to install your favorite (and not favorite but useful) applications.

  • azure-data-studio
  • sql-server-management-studio
  • docker-desktop
  • nodejs
  • git

Git SSH Key

Generate your SSH key using these instructions from BitBucket and add the key to your account. Note, when you need to run the eval $(ssh-agent) command, do so in cmder in bash. It will save you a bunch of time.

VSCode

Extensions

You can install from the cmd line using code --install-extension. Also you can see what's installed by passing the --list-extensions flag.

Here are some extensions I like.

code --install-extension dbaeumer.vscode-eslint
code --install-extension DotJoshJohnson.xml
code --install-extension eamodio.gitlens
code --install-extension EditorConfig.EditorConfig
code --install-extension esbenp.prettier-vscode
code --install-extension formulahendry.auto-close-tag
code --install-extension Gruntfuggly.todo-tree
code --install-extension KamasamaK.vscode-cfml
code --install-extension liximomo.sftp
code --install-extension mikestead.dotenv
code --install-extension mrmlnc.vscode-duplicate
code --install-extension octref.vetur
code --install-extension PKief.material-icon-theme
code --install-extension sdras.vue-vscode-snippets
code --install-extension ms-azuretools.vscode-docker

User Settings

Usually located at %USERPROFILE%\AppData\Roaming\Code\User\settings.json. Note that if you've not made any user settings in VS Code, the settings.json file may not already exist in the location above. That's fine, just drop the below JSON in a new file of that name.

{
    "auto-close-tag.excludedTags": [
        "area",
        "base",
        "br",
        "col",
        "command",
        "embed",
        "hr",
        "img",
        "input",
        "keygen",
        "link",
        "meta",
        "param",
        "source",
        "track",
        "wbr",
        "cfabort",
        "cfapplication",
        "cfargument",
        "cfassociate",
        "cfbreak",
        "cfchartdata",
        "cfcollection",
        "cfcontent",
        "cfcontinue",
        "cfcookie",
        "cfdirectory",
        "cfdump",
        "cfelse",
        "cfelseif",
        "cferror",
        "cfexecute",
        "cfexit",
        "cffile",
        "cfflush",
        "cfheader",
        "cfhttpparam",
        "cfimage",
        "cfimport",
        "cfinclude",
        "cfindex",
        "cfinput",
        "cfinvokeargument",
        "cflocation",
        "cflog",
        "cfloginuser",
        "cflogout",
        "cfmailparam",
        "cfobject",
        "cfobjectcache",
        "cfparam",
        "cfpop",
        "cfprocessingdirective",
        "cfprocparam",
        "cfprocresult",
        "cfproperty",
        "cfqueryparam",
        "cfregistry",
        "cfreportparam",
        "cfrethrow",
        "cfreturn",
        "cfschedule",
        "cfsearch",
        "cfset",
        "cfsetting",
        "cfthrow",
        "cfwddx"
    ],
    "vetur.validation.template": false,
    "eslint.validate": [
        {
            "language": "vue",
            "autoFix": true
        },
        {
            "language": "html",
            "autoFix": true
        },
        {
            "language": "javascript",
            "autoFix": true
        }
    ],
    "eslint.autoFixOnSave": true,
    "editor.formatOnSave": true,
    "terminal.integrated.fontFamily": "Anonymous Pro for Powerline",
    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.env.windows": {
        "CMDER_ROOT": "C:\\tools\\Cmder"
    },
    "terminal.integrated.shellArgs.windows": [
        "/k",
        "C:\\tools\\Cmder\\vendor\\init.bat"
    ],
    "workbench.iconTheme": "material-icon-theme",
    "editor.fontFamily": "'Operator Mono Lig', Consolas, 'Courier New', monospace",
    "editor.fontLigatures": true,
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "name": "Comment",
                "scope": [
                    "comment",
                    "comment.block",
                    "comment.block.documentation",
                    "comment.line",
                    "comment.line.double-slash",
                    "punctuation.definition.comment",
                ],
                "settings": {
                    //   "fontStyle": "",
                    "fontStyle": "italic",
                    // "fontStyle": "italic underline",
                    // "fontStyle": "italic bold underline",
                }
            },
        ]
    },
    "editor.fontWeight": "600",
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "[json]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "todo-tree.tree.showScanModeButton": false
}

Project Config Files

.editorconfig

# editorconfig.org
root = true

[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_style = space

.eslintrc.js

module.exports = {
	root: true,
	env: {
		browser: true,
		node: true,
	},
	parserOptions: {
		parser: 'babel-eslint',
	},
	extends: ['@nuxtjs', 'prettier', 'prettier/vue', 'plugin:prettier/recommended', 'plugin:nuxt/recommended'],
	plugins: ['prettier'],
	// add your custom rules here
	rules: {
		'no-console': 'off',
	},
};

.gitattributes

* text=auto eol=lf

.gitignore

# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# Mac OSX
.DS_Store

# Vim swap files
*.swp

.prettierrc

{
	"semi": true,
	"arrowParens": "always",
	"singleQuote": true,
	"useTabs": true,
	"tabWidth": 4,
	"vueIndentScriptAndStyle": true,
	"endOfLine": "lf",
	"trailingComma": "es5",
	"printWidth": 120
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment