Migrate from old repository
This commit is contained in:
commit
bbf97ae7e8
21
go.md
Normal file
21
go.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Go
|
||||
|
||||
Install go programming language to user .local/bin directory
|
||||
|
||||
## Install binary release from repositories
|
||||
|
||||
```bash
|
||||
wget -qO go.tar.gz https://dl.google.com/go/go1.9.3.linux-amd64.tar.gz \
|
||||
&& tar -C $HOME/.local -xzf go.tar.gz \
|
||||
&& rm go.tar.gz
|
||||
```
|
||||
|
||||
## Set up environment variables
|
||||
|
||||
```bash
|
||||
cat << EOF >> $HOME/.bashrc
|
||||
export GOPATH=\$HOME/Projects/go
|
||||
export GOROOT=\$HOME/.local/go
|
||||
export PATH=\$GOROOT/bin:\$PATH:\$GOPATH/bin
|
||||
EOF
|
||||
```
|
||||
21
nodejs.md
Normal file
21
nodejs.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Node.js
|
||||
|
||||
Install Node.js for Javascript auto-completion in Vim 8.
|
||||
|
||||
## Install binary release from repositories
|
||||
|
||||
```bash
|
||||
wget -qO nodejs.tar.xz https://nodejs.org/dist/v8.9.4/node-v8.9.4-linux-x64.tar.xz \
|
||||
&& tar -C $HOME/.local/ -xf nodejs.tar.xz \
|
||||
&& mv $HOME/.local/node* $HOME/.local/nodejs \
|
||||
&& rm nodejs.tar.xz
|
||||
```
|
||||
|
||||
## Set up environment variables
|
||||
|
||||
```bash
|
||||
cat << EOF >> $HOME/.bashrc
|
||||
export NODE_PATH=\$HOME/.local/nodejs
|
||||
export PATH=\$PATH:\$NODE_PATH/bin
|
||||
EOF
|
||||
```
|
||||
34
postgres.md
Normal file
34
postgres.md
Normal file
@ -0,0 +1,34 @@
|
||||
# PostgreSQL
|
||||
|
||||
## Quick start for Docker-based development
|
||||
|
||||
This quick start deployment utilizes Alpine-based image.
|
||||
|
||||
```bash
|
||||
# pull the image from docker hub
|
||||
docker pull postgresql:10-alpine
|
||||
|
||||
# define environment variables
|
||||
cat << EOF > POSTGRESENV
|
||||
POSTGRES_USER=""
|
||||
POSTGRES_PASSWORD=""
|
||||
POSTGRES_DB=""
|
||||
EOF
|
||||
|
||||
# define container name and ports
|
||||
PGSRV=""
|
||||
PGSRVPORT=""
|
||||
|
||||
docker run -d --name ${PGSRV} --env-file POSTGRESENV -p ${PGSRVPORT}:5432 postgres:10-alpine
|
||||
|
||||
# specify container name for psql configuration, if needed
|
||||
PGCLI=""
|
||||
docker run -d --name ${PGCLI} postgres:10-alpine
|
||||
|
||||
# connect using client container, enter password when prompted
|
||||
PGUSER=""
|
||||
PGDB=""
|
||||
PGHOST=""
|
||||
PGPORT=""
|
||||
docker exec -it ${PGCLI} psql -h ${PGHOST} -p ${PGPORT} -U ${PGUSER} -W -d ${PGDB}
|
||||
```
|
||||
68
vim8.md
Normal file
68
vim8.md
Normal file
@ -0,0 +1,68 @@
|
||||
# Vim
|
||||
|
||||
This document describes my personal preference for Vim 8 setup.
|
||||
|
||||
## Compile Vim 8 from source and install in home directory
|
||||
|
||||
```bsh
|
||||
# install required dependencies
|
||||
sudo apt install libncurses5-dev python3-dev git
|
||||
|
||||
# clone vim from github repositories
|
||||
git clone https://github.com/vim/vim.git
|
||||
|
||||
# build vim 8
|
||||
cd vim
|
||||
./configure --with-features=huge --enable-multibyte --enable-python3interp=yes --prefix=$HOME/.local
|
||||
make
|
||||
make install
|
||||
|
||||
# add $HOME/.local bin to PATH to prioritize Vim8
|
||||
echo "export PATH=\$HOME/.local/bin:\$PATH" >> $HOME/.bashrc
|
||||
```
|
||||
|
||||
## Setup plugins using vundle
|
||||
|
||||
```bash
|
||||
# clone from github repositories
|
||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||
|
||||
# create .vimrc configuration file in home
|
||||
cd $HOME
|
||||
cat << EOF > .vimrc
|
||||
set nocompatible
|
||||
filetype off
|
||||
|
||||
set rtp+=~/.vim/bundle/Vundle.vim
|
||||
call vundle#begin()
|
||||
|
||||
Plugin 'VundleVim/Vundle.vim'
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
Plugin 'Shougo/Denite.nvim'
|
||||
Plugin 'Valloric/YouCompleteMe'
|
||||
|
||||
call vundle#end()
|
||||
filetype plugin indent on
|
||||
|
||||
set backspace=indent,eol,start
|
||||
set tabstop=4 shiftwidth=4 expandtab
|
||||
set number numberwidth=4
|
||||
set splitbelow
|
||||
set encoding=utf-8 fileencoding=utf-8
|
||||
syntax on
|
||||
EOF
|
||||
|
||||
# install plugins
|
||||
vim +PluginInstall +qall
|
||||
```
|
||||
|
||||
# Additional config for auto-completion using YouCompleteMe
|
||||
|
||||
```bash
|
||||
# install compile dependencies
|
||||
sudo apt install build-essential cmake python-dev
|
||||
|
||||
# clone from github repositories and install python, go, and javascript completion
|
||||
cd $HOME/.vim/bundle/YouCompleteMe
|
||||
./install.py --go-completer --js-completer
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user