DEV Community

Elxpro
Elxpro

Posted on • Edited on

The most effective way to Setup your machine to use Elixir

Greeting

Hello #devElixir!!! Welcome to #FullStackElxpro

Here we discuss strategies and tips for your Elixir learning journey, from scratch to a hero Elixir developer.

I am Gustavo, and today's theme is **Setup your local machine to use Elixir**.

Do you want to learn Elixir in three months? https://elxpro.com/sell

ps: You can follow the Article with a VIDEO

Want to learn more about Elixir on a Telegram channel?

https://elxpro.com/subscribe-elxcrew

Why is it essential to set up your machine to use Elixir?

Having the tools on time will help you be more productive and performant.

And in addition to letting you perform faster, it will be simple and fast when you have everything you need to develop with Elixir.

Do you remember when it was necessary for your career?

For most of the projects I worked on, I noticed how arduous it was to set up my local machine to work with the right tools. When I decided to work with Elixir, I mapped all essential tools to work in multiple scenarios. I got lucky because this setup was always a success. Why do I want to share it with you? To make your life as an Elixir engineer easier.

Let`s start

Tools

Zsh

  • Zsh is a nice tool to use in your terminal

brew install zsh zsh-completions

Curl: Sometimes to, test HTTP requests is very usefull

Firacode: This font is easier to read for a developer.

  • After installing, I highly recommend setting up your terminal with this font.

OhMyZsh: Nice tool to make your terminal awesome for a developer

Elixir: The most important tool. Elixir lang

Phoenix: The most important framework. Phoenix to create Web Elixir projects.

GIT: Essential to control version code

Docker:

This is one of the most essential tools for a new-age developer. Docker makes our life easier to simulate environments, build our own image projects, and install databases and tools for the developers without dirtying our computers.

Redis

  • When I need to use Redis in a project, I install it using docker.
    Mongo

  • When I need to use Mongo in a project, I install it using docker.

Kafka

  • When I need to use Kafka in a project, I install it using docker. I always use the script below, and it work really well

https://gist.github.com/theguuholi/f33b000d6aa1ee83b4d403574969e4a2

Postgres

Postgres is an essential Database for those who work with Elixir. And The script below that I provided for you is a way to install the Postgres database easily and fast to start without your need to make any extra configurations in your local machine.

docker network create pg --driver bridge

docker run --name pg --network=pg -e "POSTGRES_PASSWORD=postgres" -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data -d postgres:13.4

Gigalixir

  • A very nice tool to deploy Elixir application and cheap.

Docker-compose: Most of the time, when you install Docker, the tool gives you docker-compose

Kubernetes: Most of the time, when you install Docker, the tool gives you kubernetes

K9s: Kubernetes CLI To Manage Your Clusters In Style!

kubectx: Tool to change kubernetes clusters easily

kubernetes-cli: Tool to execute commands in kubernetes.

...kubectl..... get, apply... pods, deployments....

Helm:

Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application

DBeaver: Access SQL databases

Conduktor:
We take the complexity out of Kafka. We give you the tools you need to troubleshoot, develop, test, and collaborate with confidence.

Insomnia: For me, is one the best HTTP tool, also easier to create a good APIs with REST/GraphQL documentation.

Cloud SDKs

  • Most of companies use one of them. I prefer google cloud :D

Google Cloud

Google Cloud SDK: Tool to access Google Cloud Services

Aws

Aws-Cli: Tool to access Aws Services

Eks-ctl: Tool to manage Aws kubernetes

VSCode

  • Beautify
  • Color Highlight
  • ElixirLS
  • ENV
  • Git Graph
  • Live Share
  • Markdown All in One
  • Material Icon Theme
  • Phoenix Framework
  • PostCSS Language Support
  • Tailwind CSS IntelliSense
  • Tools for Apache Kafka

My settings.json to VSCode: https://gist.github.com/theguuholi/0a8d3c8ca651f0fe737e10d53415eb20

`

{
    "editor.fontFamily": "Fira Code",
    "editor.fontLigatures": true,
    "emmet.includeLanguages": {
        "html-eex": "html"
    },
    "bracketPairColorizer.consecutivePairColors": [
        [
            "<",
            "</"
        ],
        [
            "<",
            "/>"
        ],
        [
            "Gold",
            "Orchid",
            "LightSkyBlue"
        ],
        "Red"
    ],
    "files.associations": {
        "*.eex": "html-eex",
        "*.leex": "html-eex",
        "*.heex": "html-eex"
    },
    "beautify.language": {
        "js": {
            "type": [
                "javascript",
                "json",
                "jsonc"
            ],
            "filename": [
                ".jshintrc",
                ".jsbeautifyrc"
            ]
        },
        "css": [
            "css",
            "less",
            "scss"
        ],
        "html": [
            "htm",
            "html",
            "html-eex"
        ]
    },
    "[javascript]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "[html-eex]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "workbench.iconTheme": "material-icon-theme",
    "explorer.confirmDelete": false,
    "[json]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    },
    "security.workspace.trust.untrustedFiles": "open",
    "explorer.confirmDragAndDrop": false,
    "diffEditor.ignoreTrimWhitespace": false,
    "terminal.integrated.enableMultiLinePasteWarning": false,
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "editor.codeActionsOnSave": {

    },
    "[css]": {
        "editor.defaultFormatter": "HookyQR.beautify"
    }
}
Enter fullscreen mode Exit fullscreen mode

ShortCuts and Zsh

Install Z-init:

bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"
Enter fullscreen mode Exit fullscreen mode

Plugins Zinit:

zinit light zdharma/fast-syntax-highlighting
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions
Enter fullscreen mode Exit fullscreen mode

zdharma/fast-syntax-highlighting: recognize commands
zsh-users/zsh-autosuggestions: suggest commands.
zsh-users/zsh-completion: add commands

My Zshrc config:
https://gist.github.com/theguuholi/d5da8b11d100f04290f8ba203f991767

Social networks:

Top comments (1)

Collapse
 
romenigld profile image
Romenig Lima Damasio

Nice Setup Gustavo!
I just think it ins't needed to include the PostCSS Language Support on the VSCode.
I think they quit the PostCSS in another versions.