Skip to content

Instantly share code, notes, and snippets.

@chewbh
Last active July 30, 2018 14:49
Show Gist options
  • Select an option

  • Save chewbh/d10b6ec6f97e65d8bfb642cb179d99e1 to your computer and use it in GitHub Desktop.

Select an option

Save chewbh/d10b6ec6f97e65d8bfb642cb179d99e1 to your computer and use it in GitHub Desktop.
Ubuntu Desktop Setup

Software Engineer Ubuntu based Lappy Setup

Software Installation List

  • nvm and node.js
  • java 8/9
  • sublime text 3
  • google chrome
  • visual studio code
  • yarn
  • docker-ce
  • vlc
  • pgadmin
  • zsh and oh-my-zsh (optional)
  • mosh
  • openssh-server
  • virtualbox
  • intellij
  • sdkman (optional)
  • gradle
  • apache maven
  • kotlin
  • kscript
  • scala
  • anaconda and python36
  • pig
  • elixir [optional]

NVM (Node Version Manager) and Node.JS Setup

A tool that allows downloading and installing Node.js while ensuring multiple node versions do not causes conflicting issues.

Refers to https://github.com/creationix/nvm for more information.

Downloading NVM from github:

# run this from ~/ or copy git repo to ~/.nvm
git clone https://github.com/creationix/nvm.git .nvm

# checkout branch containing the latest version (v0.33.8) as master branch might not work
git checkout v0.33.8

# activating nvm
. nvm.sh

Append the following required configuration to ~/.bashrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# change to use a internal mirror of the node binaries by setting $NVM_NODEJS_ORG_MIRROR (default is http://nodejs.org/dist)
export NVM_NODEJS_ORG_MIRROR=http://nodejs.org/dist

Remember to reopen a new terminal or source ~/.bashrc for change to take effect

Installing Node.JS via nvm

# install the latest version of Node.JS
nvm install node

# install specifically v8.9.3 of Node.JS 
nvm install 8.9.3

# if multiple version installed, switch to use specific version (e.g. v8.9.3)
nvm use 8.9.3
nvm alias default 8.9.3

# check version of runtime Node.JS is switched correct
node -v

Installing Oracle Java

Downloading Java from Oracle and put it under /usr/local/java

sudo mkdir -p /usr/local/java
sudo tar xvfz jdk-8u151-linux-x64.tar.gz -C /usr/local/java

Configure environment in ~/.bashrc

export JAVA_HOME=/usr/local/java/jdk1.8.0_151

Configure to make Java available

sudo update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000

sudo update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000

Alternatively, registering the below PPA repos (not by Oracle) to install the JDK (not a prefer method for offline environment)

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

# install latest version of oracle java 8
sudo apt-get install oracle-java8-installer

# alternatively, install latest version of oracle java 9
sudo apt-get install oracle-java9-installer

# remove the PPA since it only provides an installer, and not updates for the JDK
sudo add-apt-repository -r ppa:webupd8team/java

# for setting Java environment variables
sudo apt install oracle-java8-set-default

# for setting Java environment variables (for java 9)
sudo apt install oracle-java9-set-default

Adding APT Repository Keys

Run the following command for online environment

# sublime text 3
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

# google chrome
wget -qO - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

# visual studio code
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

# yarn (package manager)
# node is not needed/installed via apt as it will be managed by nvm 
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

# docker-ce
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# virtual box
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

For offline environment, manually download the gpg/pub files on machine with access to Internet, copy to offline environment and finally run apt-key addcommand

Example for Sublime Text 3

Instead of running wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -, do the following:

On machine with Internet:

  1. Download gpg file from https://download.sublimetext.com/sublimehq-pub.gpg
  2. Rename gpg file to sublimehq-pub.gpg and copy it to offline environment

On offline machine:

  1. cd to directory containing the gpg file
  2. run the command sudo apt-key add sublimehq-pub.gpg
  3. repeat for other repository keys

Registering APT Repositories

This should be done after adding the various apt repository keys.

# sublime text 3
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

# google chrome
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

# visual studio code
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

# yarn (package manager)
# node is not needed/installed via apt as it will be managed by nvm
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

# docker-ce
# note that add-apt-repository command requires software-properties-common to be already installed
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

# docker-ce (edge) [as of Dec 2017, Support for Ubuntu 17.10 or artful is only in edge channel]
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"

# virtual box
echo "deb http://download.virtualbox.org/virtualbox/debian artful contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Manual Installation of apt-offline

Download the apt-offline utility (deb file) from ubuntu manually on a machine with Internet access

wget -c http://security.ubuntu.com/ubuntu/pool/universe/a/apt-offline/apt-offline_1.8.1_all.deb 

Copy and install the apt-offline utility on the offline machine. Take, for instance, the copied file resides on ~/Download directory

cd ~/Download
sudo dpkg -i apt-offline_1.8.1_all.deb

apt-offline uses /etc/apt/trusted.gpg instea of /etc/apt/trusted.gpg.d directory as keyring. Thus, if see errors related to can't to check signature: public key not found, alter /etc/apt/trusted.gpg file to import missing keys

sudo apt-key exportall | sudo gpg --no-default-keyring --import --keyring /etc/apt/trusted.gpg

Updating Index of APT Repositories

Update the index or package lists of the registered APT Repositories or PPAs for package installations/upgrades. This synchronization requires Internet access.

sudo apt-get update

For offline environment, use apt-offline to update the index instead. See Section on Manual Installation of apt-offline for instructions to install apt-offline before continuing.

Define update action using apt-offline on the offline machine. This generate a signature file

# generate database of apt repositories and ppas that are needed for an update
sudo apt-offline set 01_apt_repos_update_20171212.sig --update

Copy the signature file (e.g. 01_apt_repos_update_20171212.sig) to machine with Internet access. Machine should have apt-offline as well. Note that it is possible to install apt-offline on Microsoft Windows (See apt-offline on MS Windows)

Run the following to fetch required APT data described in the signature file. The result is bundled as a single archive file (e.g. 01_apt_repos_update_20171212.zip).

# fetch data (using 2 threads) and bundled them into a single file
apt-offline get 01_apt_repos_update_20171212.sig --bundle 01_apt_repos_update_20171212.zip --threads 2

Copy the bundle file to the offline machine and finish package index update process by running below command

sudo apt-offline install 01_apt_repos_update_20171212.zip

Installing Packages from APT Repositories

For machine with Internet access, skip to Install Packages with apt-get.

For offline environment, do the following before running following the section Install Packages with apt-get.

Define install packages action using apt-offline on the offline machine. This generate a signature file

# generate database of packages to request for download
sudo apt-offline set apt_pkgs_install_20171212.sig --install-packages apt-transport-https ca-certificates curl software-properties-common vim tmux tree jq exfat-utils exfat-fuse cifs-utils smbclient nfs-common sublime-text google-chrome-stable code yarn docker-ce vlc browser-plugin-vlc pgadmin3 git-core zsh mosh openssh-server virtualbox-5.2 dkms 

Copy the signature file (e.g. apt_pkgs_install_20171212.sig) to machine with Internet access. Machine should have apt-offline as well. Note that it is possible to install apt-offline on Microsoft Windows (See apt-offline on MS Windows)

Run the following to fetch required APT data described in the signature file. The result is bundled as a single archive file (e.g. apt_pkgs_install_20171212.zip).

# fetch data (using 2 threads) and bundled them into a single file
apt-offline get apt_pkgs_install_20171212.sig --bundle apt_pkgs_install_20171212.zip --threads 2

Copy the bundle file to the offline machine and update APT database with the downloaded packages. Note that this only make apt-get able to install packages not already installed them.

sudo apt-offline install apt_pkgs_install_20171212.zip

Install Packages with apt-get

Run the following to install various packages from APT repositories and/or PPAs

# common useful utilities 
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common 

# really useful tools
sudo apt-get install vim tmux tree jq

# support for exfat
sudo apt-get install exfat-utils exfat-fuse

# support for cifs, smb and nfs
sudo apt-get install cifs-utils smbclient nfs-common  

# sublime text 3
sudo apt-get install sublime-text

# google chrome
apt-get install google-chrome-stable

# visual studio code
sudo apt-get install code

# yarn (package manager)
sudo apt-get install --no-install-recommends yarn

# docker-ce
sudo apt-get install docker-ce

# vlc
sudo apt-get install vlc browser-plugin-vlc

# pgadmin 3 (note that it's no longer maintained, should use pgadmin4 instead)
# e.g. sudo docker pull dpage/pgadmin4
sudo apt-get install pgadmin3

# zsh
sudo apt-get install git-core zsh

# mosh (mobile ssh)
sudo apt-get install mosh

# sshd
sudo apt-get install openssh-server

# virtual box
sudo apt-get install virtualbox-5.2 dkms

Upgrading Packages from APT Repositories

Ensure package list or index of APT repositories are updated. See Section Updating Index of APT Repositories for updating the index.

Define upgrade action using apt-offline on the offline machine. This generate a signature file

# generate database of packages to check for upgrade 
sudo apt-offline set apt_repos_upgrade_20171212.sig --upgrade

Copy the signature file (e.g. apt_repos_upgrade_20171212.sig) to machine with Internet access. Machine should have apt-offline as well. Note that it is possible to install apt-offline on Microsoft Windows (See apt-offline on MS Windows)

Run the following to fetch required APT data described in the signature file. The result is bundled as a single archive file (e.g. apt_repos_upgrade_20171212.zip).

# fetch data (using 2 threads) and bundled them into a single file
apt-offline get apt_repos_upgrade_20171212.sig --bundle apt_repos_upgrade_20171212.zip --threads 2

Copy the bundle file to the offline machine and install it using apt-offline utility to update APT database

sudo apt-offline install apt_repos_upgrade_20171212.zip

Intellij IDEA

Download the binaries from Jetbrains

Example:

2017.3.1 (build 173.3942.27) Released: Dec 12. 2017

Extract the downloaded file under /opt and run it for the 1st time to create Desktop Entry for Intellij Idea

sudo tar xvfz ideaIU-2017.3.1.tar.gz -C /opt/

/opt/ideaIU-2017.3.1.tar.gz/bin/idea.sh

Installing useful plugins

Download and install the plugins from Jetbrains Plugins Repository

intellij plugins

Installing vsix Extensions for Visual Studio Code

This method uses the custom download_vsix.sh and install_vsix.sh shell scripts. It works for offline as well.

  1. Put the extensions to be downloaded into the vsix array inside download_visx as a string of this format ".:"
  2. Run ./download_vsix.sh (on machine with Internet access) that will download the vsix files into vsix directory
  3. Run ./install_vsix.sh (on offline machine) to install all extension files inside vsix directory

Note that PeterJausovec.vscode-docker:0.0.22 has issue installing offline

Sample of Visual Studio Code's Preferred Setting

{
    "gitlens.advanced.messages": {
        "suppressCommitHasNoPreviousCommitWarning": false,
        "suppressCommitNotFoundWarning": false,
        "suppressFileNotUnderSourceControlWarning": false,
        "suppressGitVersionWarning": false,
        "suppressLineUncommittedWarning": false,
        "suppressNoRepositoryWarning": false,
        "suppressUpdateNotice": false,
        "suppressWelcomeNotice": true
    },
    "editor.renderIndentGuides": false,
    "workbench.iconTheme": "vscode-icons",
    "sublimeTextKeymap.promptV3Features": true,
    "editor.formatOnSave": true,
    "editor.tabCompletion": true,
    "editor.quickSuggestions": {
        "other": false,
        "comments": false,
        "strings": false
    },
    "prettier.eslintIntegration": true
}

Terminal Configuration

It is crucial to change profile preference of terminal to run command as a login shell for .bash_profile and .profile to work as expected.

In Ubuntu or its varient, preferably, use .profile instead of .bash_profile.

Note that ~/.profile will creased to work when ~/.bash_profile exists.

Gradle Installation

If online, via sdkman:

sudo curl -s "https://get.sdkman.io" | bash
sdk install gradle

If offline, download the binary from gradle and run the following command from download directory.

sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle gradle-4.4.1-all.zip
sudo echo "export PATH=$PATH:/opt/gradle/gradle-4.4.1/bin" >> ~/.bashrc

Maven Installation

If online, via sdkman:

sudo curl -s "https://get.sdkman.io" | bash
sdk install maven

If offline, download the binary from apache and run the following command from download directory.

sudo mkdir /opt/maven
sudo tar xvfz apache-maven-3.5.2-bin.tar.gz -C /opt/maven
sudo echo "export PATH=$PATH:/opt/maven/apache-maven-3.5.2/bin" >> ~/.bashrc

Kotlin Installation

If online, via sdkman:

sudo curl -s "https://get.sdkman.io" | bash
sdk install kotlin

If offline, download the compiler from github and run the following command from download directory

sudo mkdir /opt/kotlin
sudo unzip -d /opt/kotlin-compiler-1.2.10.zip
sudo echo "export PATH=$PATH:/opt/kotlin/kotlin-1.2.10/bin" >> ~/.bashrc

KScript Installation

kscript requires Kotlin and Maven to be installed.

If online, kscript can be installed via sdkman:

sudo curl -s "https://get.sdkman.io" | bash
sdk install kscript

If offline, download the binary from github and run the following command from download directory

sudo mkdir /opt/kscript
sudo unzip -d /opt/kscript-2.3.0-bin.zip
sudo echo "export PATH=$PATH:/opt/kotlin/kotlin-1.2.10/bin" >> ~/.bashrc

Scala and SBT Installation

If online, via sdkman:

sudo curl -s "https://get.sdkman.io" | bash
sdk install scala

If offline, via Scala plugin in Intellij and Gradle with access to artifact repository

zsh and oh-my-zsh setup [Optional can chose Prezto for performance]

Ensure git core and zsh are installed before continuing

If online, run the below command to install oh-my-zsh:

sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

If offline, perform the following steps instead:

  1. download the git repository from github, extract it to the home directory and rename it to .oh-my-zsh

Thus, it should be ~/.oh-my-zsh

  1. Save the file install-oh-my-zsh.sh from hewerthomn's gist to home directory, i.e. ~/install-oh-my-zsh.sh

  2. Give permission to execute for the script and run it

Run the script

chmod +x install-oh-my-zsh.sh
./install-oh-my-zsh.sh

# set default sh
chsh -s `which zsh`
  1. append the added config from .bashrc to .zshrc that are resulted from earlier package installation. Note that .zshrc does not read in .bashrc so the config need to be duplicated (which explanis the need for this step)
# nvm setup
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/<username>/.sdkman"
[[ -s "/home/<username>/.sdkman/bin/sdkman-init.sh" ]] && source "/home/<username>/.sdkman/bin/sdkman-init.sh"

  1. [Optional] very personal - change theme from robbyrussell to wezm.

Comment ZSH_THEME=robbyrussell and add the following in .zshrc

#ZSH_THEME="robbyrussell"
#ZSH_THEME="powerlevel9k/powerlevel9k"
#ZSH_THEME="agnoster"
#ZSH_THEME="nebirhos"
#ZSH_THEME="norm"
#ZSH_THEME="bira"
ZSH_THEME="wezm"

  1. Enable useful plugins in .zshrc by searching for plugins=(... and change it to below:
plugins=(
  git command-not-found
)
  1. Restart by runing sudo shutdown -r 0

Powerline Fonts Installation

Run the below command or download the git repo for powerline font to certain folder, and run the various command

git clone https://github.com/powerline/fonts.git --depth=1
fonts/install.sh

#resolves issue where terminess pwerline is ignored by default and must be explicitly allowed via fontconfig
mkdir -p ~/.config/fontconfig/conf.d/ && cp fonts/fontconfig/50-enable-terminess-powerline.conf ~/.config/fontconfig/conf.d/

# refresh font cache
fc-cache -vf

Change the Terminal profile preference to use Fira Mono for Powerline Regular

Prezto for zsh Installation

If oh-my-zsh is already installed, backup the following files to ~/config_backup and run uninstall_oh_my_zsh

  • ~/.oh-my-zsh
  • ~/.zshrc

Install zsh if you have not done so.

Run the below command to clone prezto git repos and all submodules to home directory.

git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

Remove .zshrc if it exists. Run below command to install prezto

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

Put back all custom configurations, exports, alias from .zshrc (backup) to the new soft-linked .zshrc

Below is a sample of the custom config to be appended back

export EDITOR="vim"
export VISUAL=$EDITOR
export LSCOLORS="Gxfxcxdxbxegedabagacad"

# added by Anaconda2 installer
export PATH="/home/<username>/anaconda2/bin:$PATH"

# nvm setup
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/<username>/.sdkman"
[[ -s "/home/<username>/.sdkman/bin/sdkman-init.sh" ]] && source "/home/<username>/.sdkman/bin/sdkman-init.sh"

Modify the .zpreztorc to enable modules and set theme

# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'history-substring-search' \
  'directory' \
  'spectrum' \
  'utility' \
  'tmux' \
  'git' \
  'completion' \
  'command-not-found' \
  'syntax-highlighting' \
  'prompt' \

# ...

# Set the prompt theme to load.
# Setting it to 'random' loads a random theme.
# Auto set to 'off' on dumb terminals.
#zstyle ':prezto:module:prompt' theme 'sorin'
#zstyle ':prezto:module:prompt' theme 'powerlevel9k'
zstyle ':prezto:module:prompt' theme 'walters'

Anaconda and Python 3.6

This provides data science related python packages and development environment. It includes Juypter Notebook.

Download the binary for Anaconda2 (since default python is 2.7) from anaconda.org and run these commands:

chmod +x Anaconda2-5.0.1-Linux-x86_64.sh
bash ~/Downloads/Anaconda2-5.0.1-Linux-x86_64.sh

Remember to copy the same path configuration in .bashrc to .zshrc if zsh is installed

Create a python 3.6 environment with anaconda3 packages installed by running this command (need to be online). For offline, require setting up an offline channel.

conda create -n <environment_name> python=3.6 anaconda

Activate the newly created environment to switch over

Misc - Downloading node.js installation package to move to Node.JS mirror

Running the following command

wget -m -e robots=off --no-parent --reject="index.html*" http://nodejs.org/dist/

Misc - CIFS mount sample

Create directory to house mounted content. i.e. mkdir /media/samba_share

Append the following into fstab and run sudo mount -a

//servername/sharename /media/samba_share cifs uid=1000,iocharset=utf8,vers=2.1 0 0

Alternatively, mount it directly (show param necessary if is v3.0)

sudo mount -t cifs //servername/sharename /media/samba_share -o username=xxx,uid=1000,vers=3.0,sec=ntlm

Misc - Troubleshooting slow SSH's password prompt for login

  • append -vvv flag to see detailed trace of what is causing the delay or pause
ssh -vvv user@servername:/paths

Problem could be on server or client.

Check for:

  1. reverse DNS lookup timeout

Turn off reverse DNS lookup on server (it's use for diagnose breakin attempt only). add UseDNS no to /etc/ssh/sshd_config

sed -i 's/#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config
grep -i dns /etc/ssh/sshd_config
systemctl sshd restart
  1. GSSAPI authentication timeout on client

Turn off by adding the line GSSAPIAuthentication no to /etc/ssh/ssh_config or ~/.ssh/config (on client side)

Good Reference

https://robots.thoughtbot.com/a-tmux-crash-course https://github.com/sorin-ionescu/prezto http://mikebuss.com/2014/02/02/a-beautiful-productive-terminal-experience/

#!/bin/bash
vsixs=(
"dbaeumer.vscode-eslint:1.4.3"
"formulahendry.auto-close-tag:0.5.5"
"kevinkyang.auto-comment-blocks:1.0.1"
"dzannotti.vscode-babel-coloring:0.0.4"
"wcwhitehead.bootstrap-3-snippets:0.1.0"
"wmaurer.change-case:1.0.0"
"formulahendry.code-runner:0.8.6"
"clinyong.vscode-css-modules:0.2.2"
"pranaygp.vscode-css-peek:2.0.2"
"stevejpurves.cucumber:0.9.6"
"yoyo.D3Snippets:0.1.11"
"msjsdiag.debugger-for-chrome:4.0.0"
"PeterJausovec.vscode-docker:0.0.22"
"EditorConfig.EditorConfig:0.11.1"
"idleberg.icon-fonts:1.10.1"
"eamodio.gitlens:7.1.0"
"codezombiech.gitignore:0.5.0"
"cazzar09.Gradle:1.1.2"
"spywhere.guides:0.9.1"
"Zignd.html-css-class-completion:1.14.0"
"xabikos.JavaScriptSnippets:1.5.0"
"secanis.jenkinsfile-support:0.1.0"
"andys8.jest-snippets:1.1.0"
"donjayamanne.jquerysnippets:0.0.1"
"richie5um2.vscode-statusbar-json-path:1.0.7"
"mathiasfrohlich.Kotlin:1.3.0"
"ipedrazas.kubernetes-snippets:0.1.3"
"haaaad.ansible:0.2.5"
"tomphilbin.lodash-snippets:1.1.0"
"spoonscen.es6-mocha-snippets:0.0.4"
"maty.vscode-mocha-sidebar:0.14.16"
"christian-kohler.npm-intellisense:1.3.0"
"eg2.vscode-npm-script:0.3.3"
"christian-kohler.path-intellisense:1.4.2"
"esbenp.prettier-vscode:1.0.1"
"zxh404.vscode-proto3:0.1.2"
"jalisimo.react-jest-vscode-snippets:0.0.3"
# "dsznajder.es7-react-js-snippets:1.3.0"
"Orta.vscode-jest:2.5.5"
"xabikos.ReactSnippets:1.7.0"
"timothymclane.react-redux-es6-snippets:2.1.0"
"chrmarti.regex:0.1.0"
"mrmlnc.vscode-scss:0.6.2"
"cdsama.shell-snippets:0.1.2"
"Tyriar.sort-lines:1.4.1"
"sidthesloth.svg-snippets:1.0.1"
"Tyriar.terminal-tabs:0.1.1"
"wayou.vscode-todo-highlight:0.5.11"
"shardulm94.trailing-spaces:0.2.11"
"eg2.tslint:1.0.24"
"adamhartford.vscode-base64:0.0.1"
"robertohuertasm.vscode-icons:7.19.0"
"jeremyrajan.webpack:2.0.2"
"adamvoss.yaml:0.0.9"
"gamunu.vscode-yarn:1.3.0"
"bajdzis.vscode-database:1.2.0"
"ms-vscode.sublime-keybindings:3.0.3"
"ms-vscode.atom-keybindings:3.0.4"
"ms-python.python:0.9.1"
"redhat.java:0.16.0"
"lukehoban.Go:0.6.70"
"alefragnani.project-manager:0.23.1"
"humao.rest-client:0.16.2"
"hollowtree.vue-snippets:0.1.5"
"octref.vetur:0.11.5"
"k--kato.intellij-idea-keybindings:0.2.17"
)
for vsix in "${vsixs[@]}"
do
publisher=${vsix%%.*}
extWithVersion=${vsix#*.}
extension=${extWithVersion%%:*}
version=${extWithVersion##*:}
echo "downloading publisher=$publisher extension=$extension version=$version"
wget -qcO - http://$publisher.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/$extension/$version/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage > "vsix/$publisher.$extension-$version.vsix"
done
#!/bin/bash
for vsix in vsix/*.vsix
do code --install-extension $vsix
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment