Skip to content

Instantly share code, notes, and snippets.

@igodorogea
Last active January 25, 2024 18:51
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 igodorogea/8accd93d7b548df3d58aac52056f3872 to your computer and use it in GitHub Desktop.
Save igodorogea/8accd93d7b548df3d58aac52056f3872 to your computer and use it in GitHub Desktop.
Windows PC Setup

Windows PC Setup

0. Prerequisites

Add Microsoft store
https://github.com/kkkgo/LTSC-Add-MicrosoftStore

Make sure winget is installed
https://github.com/microsoft/winget-cli#microsoft-store-recommended

Allow script execution

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm

1. Setup powershell theme

1.1. Install posh-git

https://github.com/dahlbyk/posh-git#installation

Install-Module posh-git -Scope CurrentUser

1.2. Install oh-my-posh

https://ohmyposh.dev/docs/installation/windows

winget install JanDeDobbeleer.OhMyPosh -s winget
oh-my-posh font install

Note: Cascadia Mono font recomended

1.3. Install PSReadLine

Install-Module -Name PowerShellGet -Force
Exit
Install-Module PSReadLine -AllowPrerelease -Force

1.4. Add modules to you PS profile

Then run "notepad $PROFILE" and add these lines to the end:

Import-Module posh-git
oh-my-posh init pwsh  --config "$env:POSH_THEMES_PATH/aliens.omp.json" | Invoke-Expression

2. Install apps

Install PrtScr https://www.fiastarta.com/PrtScr/Download.html

winget install --accept-source-agreements --silent "Git.Git"
winget install --accept-source-agreements --silent "Microsoft.VisualStudioCode"
winget install --accept-source-agreements --silent "Notepad++.Notepad++"
winget install --accept-source-agreements --silent "CodecGuide.K-LiteCodecPack.Mega"
winget install --accept-source-agreements --silent "Microsoft.Skype"
winget install --accept-source-agreements --silent "Telegram.TelegramDesktop"
winget install --accept-source-agreements --silent "Opera.Opera"
winget install --accept-source-agreements --silent "Mozilla.Thunderbird"
winget install --accept-source-agreements --silent "Ookla.Speedtest.Desktop"
winget install --accept-source-agreements --silent "Windows Camera"
winget install --accept-source-agreements --silent "Windows Calculator"
winget install --accept-source-agreements "OpenJS.NodeJS.LTS"
winget install --accept-source-agreements --silent "dotPDNLLC.paintdotnet"
winget install --accept-source-agreements --silent "JetBrains.IntelliJIDEA.Ultimate"

Optional

  • "Balsamiq.Wireframes" - deigning tool
  • "Inkscape.Inkscape" - svg editor
  • Slack
  • Teams
  • TeamViewer
  • mkvtoolnix

3. Git setup

3.1. Generating a new SSH key

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key

  1. Open Git bash
  2. ssh-keygen -t ed25519 -C "your_email@example.com"
    fallback ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  3. Import public key in github https://github.com/settings/keys
[user]
name = name
email = email
[credential]
helper = manager
[alias]
last = log -1 --stat
cp = cherry-pick
co = checkout
cl = clone
ci = commit
st = status -sb
br = branch
unstage = reset HEAD --
dc = diff --cached
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all
[core]
autocrlf = input
editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin

Intellij Idea setup

  1. Line endings to LF (Editor -> Code Style -> Line separator)
  2. Add empty line at the end of file (Editor -> General -> Ensure every saved file ...)
  3. Memory and compiler heap size
  4. Maven settings (skip tests/always update snapshots/nexus repo)
  5. File > Settings | Editor > Code Style > Typescript | Imports tab - check options "Sort imported members" and "Sort imports by modules"
  6. Mark unsaved files (File > Settings | Editor > General > Mark modified)
  7. Autosave (File | Settings | Appearance & Behavior | System Settings > Autosave [uncheck all except "Synchronize ..."])
  8. Adjust fonts (File | Settings | Editor | Font > Operator Mono 16/1.4 Book/Bold)
  9. Ignore .idea and .iml -> File > Settings | Editor > File Types | Ignored Files and Folders
  10. Keymap: Netbeans
    • prettier