Skip to content

nmarghetti/common_env

Repository files navigation

Common env

Codacy Badge Build



Description

This project aim to facilitate the setup of a common environment for people with completely different computer skills (developper, tester, business analyst, etc.). It's first part facilitate a common usage of GIT and python for Linux, macOS and Windows. The second part, for Windows users, is focused on installing a portable tools environment.

  1. Common core

    • Git: common configuration and aliases to simplify git usage, check this GIT GUIDE.
    • Python: brings a simple way to create, list and switch between several python environments (eg. between python 2.x 3.x)
  2. Windows

For Windows user it brings a portable environment with several applications already configured and integrated in PortableApps which also offer a huge catalog of other portable applications. Check the Features section to know more.

Setup

Portable environment for Windows

Download setup.cmd and setup.ini (Right click -> "Save Link As...") into a folder preferably with no space (eg. "C:\PortableEnv"), execute setup.cmd and follow the instruction written in the terminal.

C:/PortableEnv
├── setup.cmd
└── setup.ini

Check this installation guide for more details.

Common configuration only

The common setup is as easy as follow:

# Clone the repository
git clone https://github.com/nmarghetti/common_env.git

# Run the setup
./common_env/scripts/setup.sh

Features

  1. Common core

    The common part works for the following environment:

    • Linux via bash or zsh
    • macOS via bash or zsh
    • Windows
      • WSL (Windows Subsystem for Linux)
      • Bash on Unbuntu on Windows (that requires WSL)
      • Powershell by invoking wsl or bash (requires the corresponding one above)

    Either you are on Windows, Linux or macOS and using bash or zsh, you would get:

    • Python virtual environment easy to handle with few simple shell functions:
      • pyinfo: display information about the current python in use
      • pylist: list your available python venv
      • pycreate [python_path][version]: create a venv name version with python from python_path
      • pyset version: activate the venv version (it has to exist from list given by "pylist")
      • pyunset: deactivate current venv
    • Git configured with some core settings and many useful aliases
      • core settings about whitespace, EOL, filemode, symlinks, long path, etc.
      • main coloration
      • many aliases to handle several usecases and for each it displays the full real git command invoked
  2. macOS

    On macOs it will also install some extra package to have necessary GNU tools such as readlink, awk, sed, etc.

  3. Windows portable env

    If you are on Windows, you can get a portable development environment (it is not hardly installed in the system, all the applications are portable) with the following tools especially configured:

    • Visual Studio Code (~250M) with several extensions
    • Git for Windows (~280M)
      • tools: curl, rsync, tree, wget (~6M)
      • pacman package manager (~50M) and additional packages:
        • man (~130M)
        • zsh
        • tmux
        • make, cmake, mingw-w64-x86_64-toolchain for C/C++ dev (~1G)
    • PyCharm (~700M)
    • Intellij IDEA (~1.6G)
    • Spring Tool Suite (~800M)
    • PuTTY (~5M)
    • Cmder (~30M)
    • MobaXterm (~13M)
    • SuperPuTTY (~2M)
    • Tabby (~300M)
    • Python (2.7)
    • Python (3.8) (~50M)
    • Java SDK (15) (~300M)
    • Node.js (~65M)
    • nvm (~120K)
    • pyenv (~150M)
    • Gradle (~110M)
    • Elastic ELK stack (Elasticsearch, Logstash, Kibana) (~1.7G)
    • Google cloud SDK (~500M)
    • Lens (~850M)
    • DBeaver (~130M)
    • Cygwin
    • XAMPP
    • Podman Deskptio
    • WSL Ubuntu (Install and configure Ubuntu-24.04 within the common_env, but not fully portable)
    • WSL (Install and configure Ubuntu-20.04 in the system, it is not portable)
    • Docker Desktop (Install Docker Desktop in the system, it is not portable)
    • Podman (Install podman, it is not portable)
    • VcXsrv (Install VcXsrv Windows X Server in the system, it is not portable)

    You could optionnally get a bunch of other applications from PortableApps:

    • Notepad++
    • Google Chrome
    • Mozilla Firefox
    • 7-Zip
    • Process Explorer
    • etc.

    Visual Studio Code and the other tools are configured to work together. It brings a common configuration between developpers to ensure to format source code, configuration file or even README the same way.
    Each developper can contribute to the tools and everyone would benefit from it.
    Any developper could join and install quickly everything like the others with only few simple steps.

Git

If you are looking for an easy way to start with Git, you can follow this guide.

You can define those environment variables to customize git:

  • GIT_CMD_NOCOLOR=1 to not display real git command for aliases in color (as it can be a bit slow)
  • GIT_CMD_NOECHO=1 to not display real git command for aliases

Cmder

Cmder shortcuts

  1. Tasks

    • alt+shift+1: open task 1 --> open Git-bash
    • alt+shift+2: open task 2 --> ssh remote machine 1
    • etc.
  2. Split screen

    • ctrl+alt+right arrow: split vertically
    • ctrl+alt+down arrow: split horizontally
    • ctrl+shift+arrow (up, down, left, right): change the focus to the terminal of the arrow direction
    • ctrl+alt+shift+arrow (up, down, left, right): increase the size of the current terminal in the arrow direction
  3. Tabs

    • ctrl+tab: focus on next tab on the right
    • ctrl+shift+tab: focus on next tab on the left
    • win+alf+arrow (left, right): move the current tab to the arrow direction

AutoHotkey

AutoHotkey shorcuts

  • Win + !: switch ON/OFF current window always on top
  • Win + Shift + Up arrow: maximize current window among all similar monitors
  • Win + Shift + Down arrow: maximize current window in only one monitor

Usefull links

  1. Git

  2. Python

  3. Visual Studio Code

  4. PortableApps

  5. Xterm

  6. Other

About

Setup for common env between developpers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published