|
# Git |
|
sudo apt-get install git |
|
git config --global alias.co checkout |
|
git config --global alias.br branch |
|
git config --global alias.ci commit |
|
git config --global alias.st status |
|
git config --global alias.new checkout -b |
|
git config --global alias.lg log --oneline -25 |
|
git config --global core.editor nano |
|
git config --global user.name leemour |
|
git config --global user.email [email protected] |
|
|
|
# 1. Flat theme, flat icons |
|
# Best theme - http://www.techwall.org/how-to-install-adapta-gtk-theme-on-ubuntu-18-04/ |
|
# 2nd best - https://github.com/vinceliuice/vimix-gtk-themes |
|
# Icons - https://snwh.org/paper |
|
# Use gnome-tweak-tools to set them |
|
|
|
# Ubu < 18.04 |
|
# https://github.com/anmoljagetia/Flatabulous |
|
sudo add-apt-repository ppa:noobslab/themes |
|
sudo add-apt-repository ppa:noobslab/icons |
|
sudo apt-get update |
|
sudo apt-get install flatabulous-theme |
|
sudo apt-get install ultra-flat-icons |
|
# Use unity-tweak-tool or Ubuntu-tweak-tool to select theme & icons |
|
|
|
# Install Oh-My-ZSH |
|
sudo apt-get install zsh |
|
chsh -s /bin/zsh |
|
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" |
|
# Add oh-my-zsh server config (from ZSH gist) |
|
nano ~/.zshrc |
|
# Add theme (from ZSH gist) |
|
nano ~/.oh-my-zsh/themes/leemour.zsh-theme |
|
# Or install a modern theme https://github.com/romkatv/powerlevel10k |
|
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions |
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting |
|
sudo apt install autojump |
|
|
|
# Install NodeJS via NVM |
|
sudo apt-get install build-essential libssl-dev curl |
|
# Check NVM latest version |
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash |
|
source ~/.profile |
|
nvm ls-remote |
|
nvm install 6.5.0 |
|
nvm alias default 6.5.0 |
|
|
|
# Install ImageMagick |
|
sudo apt-get install imagemagick |
|
# Install jpegoptim, optipng for Carrierwave::ImageOptimizer |
|
sudo apt-get install jpegoptim |
|
sudo apt-get install optipng |
|
|
|
# Setup timezone |
|
sudo timedatectl set-timezone Europe\/Moscow |
|
|
|
# Install Postgres 15 |
|
# Create the file repository configuration |
|
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' |
|
# Import the repository signing key |
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null |
|
# Update list of available packages |
|
sudo apt update |
|
sudo apt install postgresql-15 postgresql-client-15 -y |
|
sudo apt-get install postgresql-contrib libpq-dev |
|
sudo su postgres |
|
# create user with DB |
|
createuser -S -d -R -e -l -P advert # Enter password in prompt |
|
createdb -O advert advert |
|
# Change local all all peer to md5 |
|
nano /etc/postgresql/15/main/pg_hba.conf |
|
sudo service postgresql restart |
|
# Remove old Postgres if required |
|
sudo apt-get --purge remove postgresql-15 postgresql-client-15 |
|
# Check apt --installed list | grep postgres |
|
sudo update-rc.d postgresql enable |
|
|
|
# Sqlite |
|
sudo apt-get install sqlite3 libsqlite3-dev |
|
|
|
# Nginx |
|
sudo apt-get install nginx nginx-extras |
|
# Hide technology headers |
|
# nano shared/config/nginx_production.conf |
|
# server_tokens off; |
|
# more_set_headers 'Server: anon'; |
|
# more_set_headers 'X-Runtime'; |
|
|
|
# Redis |
|
sudo apt-get install tcl |
|
sudo apt-get install redis-server |
|
|
|
# Install Ruby with Frum |
|
https://github.com/TaKO8Ki/frum |
|
|
|
# Install Ruby via Rbenv |
|
git clone https://github.com/rbenv/rbenv.git ~/.rbenv |
|
# Install dependencies |
|
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn |
|
# sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev |
|
cd ~/.rbenv && src/configure && make -C src |
|
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build |
|
# For old Rubies < 2.4 need openssl 1.0 not 1.1 so |
|
sudo apt install libssl1.0-dev |
|
# Install Ruby 2.4.1 |
|
rbenv install -l |
|
rbenv install 2.4.1 |
|
rbenv rehash |
|
rbenv global 2.4.1 |
|
gem install bundler |
|
(echo install: --no-document && echo update: --no-document) >> ~/.gemrc |
|
|
|
# IRB |
|
nano ~/.irbrc |
|
# require 'irb/ext/save-history' |
|
# #History configuration |
|
# IRB.conf[:SAVE_HISTORY] = 5000 |
|
# IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" |
|
|
|
# PhantomJS for poltergeist (https://gist.github.com/julionc/7476620) |
|
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" |
|
wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 |
|
sudo tar xvjf $PHANTOM_JS.tar.bz2 |
|
sudo mv $PHANTOM_JS /usr/local/share |
|
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin |
|
phantomjs --version |
|
|
|
# IPTables |
|
sudo iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-port 3000 |
|
# Save iptables to file |
|
sudo bash -c "iptables-save -c > /etc/iptablesrc" |
|
sudo nano /etc/rc.local |
|
# Apply iptablesrc on system boot: |
|
# /sbin/iptables-restore < /etc/iptablesrc |
|
|
|
# Skype |
|
# sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" |
|
# sudo dpkg --add-architecture i386 |
|
# sudo apt-get update |
|
# sudo apt-get install skype |
|
# mkdir -p ~/.config/autostart/ |
|
# cp /usr/share/applications/skype.desktop ~/.config/autostart/ |
|
# sudo apt install pulseaudio |
|
# sudo apt install pavucontrol |
|
# |
|
# http://www.linuxrussia.com/skype-ubuntu.html |
|
wget -q -O - https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add - |
|
sudo sh -c 'echo "deb [arch=amd64] https://repo.skype.com/deb stable main" > /etc/apt/sources.list.d/skype-stable.list' |
|
sudo apt-get update && sudo apt-get install skypeforlinux -y |
|
|
|
# Google Chrome |
|
# https://www.linuxbabe.com/ubuntu/install-google-chrome-ubuntu-16-04-lts |
|
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - |
|
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list |
|
sudo apt update |
|
sudo apt install google-chrome-stable |
|
|
|
# Pinta |
|
sudo add-apt-repository ppa:pinta-maintainers/pinta-stable |
|
sudo apt-get update |
|
sudo apt-get install pinta |
|
|
|
# Slack |
|
# Get from https://slack.com/downloads/linux |
|
|
|
# Postman |
|
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz |
|
sudo tar -xzf postman.tar.gz -C /opt |
|
rm postman.tar.gz |
|
sudo ln -s /opt/Postman/Postman /usr/bin/postman |
|
## Add icon |
|
cat > ~/.local/share/applications/postman.desktop <<EOL |
|
[Desktop Entry] |
|
Encoding=UTF-8 |
|
Name=Postman |
|
Exec=postman |
|
Icon=/opt/Postman/resources/app/assets/icon.png |
|
Terminal=false |
|
Type=Application |
|
Categories=Development; |
|
EOL |
|
|
|
# mitmproxy |
|
sudo apt install python3-pip |
|
pip3 install mitmproxy |