Skip to content

Instantly share code, notes, and snippets.

@fecaps
Last active July 9, 2021 20:51
Show Gist options
  • Save fecaps/005c1f9620aa58a9873f3e2b1b1acd55 to your computer and use it in GitHub Desktop.
Save fecaps/005c1f9620aa58a9873f3e2b1b1acd55 to your computer and use it in GitHub Desktop.
Machine Setup - Part 2 (Ubuntu)

Part 2 - Setup

Git and SSH

  1. Generating new SSH
$ ssh-keygen -t rsa -b 4096 -C "mail@mail.com"
  1. Start ssh-agent in the background:
$ eval "$(ssh-agent -s)"
  1. Add ssh to ssh-agent:
$ ssh-add ~/.ssh/id_rsa
  1. Copy ssh from this command:
$ cat ~/.ssh/id_rsa.pub
  1. Add new ssh to:

Visual Code - Config

  1. Create file: touch ~/.config/Code/User/settings.json

  2. Paste it to file:

{
    "editor.fontFamily": "DejaVu Sans Mono",
    "editor.tabSize": 2,
    "editor.fontSize": 12,
    "editor.trimAutoWhitespace": true,
    "editor.minimap.enabled": false,
    "editor.wordWrap": "on",
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.snippetSuggestions": "top",
    "editor.formatOnPaste": false,
    "editor.rulers": [
        80,
        120
    ],
    "workbench.startupEditor": "newUntitledFile",
    "workbench.colorTheme": "Material Theme Darker",
    "workbench.iconTheme": "material-icon-theme",
    "workbench.editor.enablePreview": false,
    "files.trimTrailingWhitespace": true,
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "explorer.openEditors.visible": 0,
    "explorer.autoReveal": false,
    "window.zoomLevel": 0,
    "window.closeWhenEmpty": false,
    "[markdown]": {
        "editor.wordWrap": "on",
        "editor.quickSuggestions": true
    },
    "workbench.list.horizontalScrolling": true,
    "typescript.updateImportsOnFileMove.enabled": "never",
    "javascript.updateImportsOnFileMove.enabled": "never",
    "workbench.settings.editor": "json",
    "importCost.timeout": 60000,
    "breadcrumbs.enabled": true
}
  1. Add User Snippets

    • Create file: mkdir ~/.config/Code/User/snippets && touch ~/.config/Code/User/snippets/javascript.code-snippets

    • Paste it in this file:

    {
        "Print to console": {
            "scope": "javascript,typescript",
            "prefix": "clog",
            "body": [
                "console.log('\\n\\n', { params }, '\\n\\n')"
            ],
            "description": "Log output to console log"
        },
        "Print to console object": {
            "scope": "javascript,typescript",
            "prefix": "cdir",
            "body": [
                "console.log('\\n\\n')",
                "console.dir(response, { depth: null })",
                "console.log('\\n\\n')"
            ],
            "description": "Log output to console dir"
        },
    }

Update ZSH Plugins

vim ~/.zshrc

Copy and paste the code below to plugins:

git
zsh-syntax-highlighting
colored-man-pages
web-search
git-extras
kubectl

Setup Postgres (user/password)

  1. Connect to postgres:
$ sudo service postgresql start && sudo -u postgres psql
  1. Alter password:
ALTER USER postgres PASSWORD 'postgres';

Setup MySQL (user/password)

  1. Get default password:
$ sudo service mysql start && sudo cat /etc/mysql/debian.cnf
  1. Connect to MySQL (changing [client.user] and [client.password] based on the file above:
mycli mysql://[client.user]:[client.password]@127.0.0.1:3306/mysql
  1. Alter password:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123';

Install Ulauncher extensions

  • jetbrains
  • VS Code Projects
  • File Search
  • Github search
  • DevDocs
  • Google Chrome bookmarks

Install Gnome extensions

  • AlternateTab
  • Applications Menu
  • Extensions
  • Places Status Indicator
  • Ubuntu AppIndicators
  • Ubuntu Dock
@fecaps
Copy link
Author

fecaps commented Apr 21, 2019

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