Skip to content

Instantly share code, notes, and snippets.

@ifasanelli
Last active October 25, 2022 13:48
Show Gist options
  • Save ifasanelli/056e8f3bc380a2f65b686b943c0c7b67 to your computer and use it in GitHub Desktop.
Save ifasanelli/056e8f3bc380a2f65b686b943c0c7b67 to your computer and use it in GitHub Desktop.

Configurando o PC

Após a instalação do OS, atualizar o sistema

Reiniciar o sistema

Instalando aplicações

Git

sudo apt install git

Configurando o Git

git config --global color.ui true
git config --global user.name "Italo Fasanelli"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -b 4096 -C "[email protected]"

Copiar a chave:

cat ~/.ssh/id_rsa.pub

Colar aqui

Verificar se funcionou:

ssh -T [email protected]

CURL

sudo apt install curl

RVM, Ruby, NodeJs, Yarn, Sqlite3 and libs

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update

sudo apt-get install git-core 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 libgdbm-dev libncurses5-dev automake libtool bison libffi-dev

gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

curl -sSL https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

rvm install 3.1.2

rvm use 3.1.2 --default

ruby -v

gem install bundler

Chrome

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

VSCode

sudo snap install --classic code

Vim

sudo apt install vim

Gimp & Slack

Instalar no Ubuntu Software

Postgres

1. Adicionando Postgres a um repositório APT

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -

2. Instalando Postgres

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install postgresql-9.6 postgresql-contrib-9.6 libpq-dev 

3. Conectando ao Postgres

sudo su postgres

sudo -u postgres psql

sudo service postgresql restart

psql

4. Configurando

sudo vim /etc/postgresql/9.6/main/pg_hba.conf
# Database administrative login by Unix domain socket
local   all             postgres                                trust
# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
sudo service postgresql restart

5. Remover uma versão

sudo apt-get purge postgresql-13 postgresql-client-13 postgresql-client-common postgresql-common

OpenVPN

sudo apt install openvpn vpnc vpnc-scripts expect

Configurando OpenVPN - Tenda

sudo vim ~/.ssh/config
Host tenda-qa
  Hostname sawsautsegdev01
  ProxyCommand ssh cofredesenhastenda -W %h:%p
  User deployer
  LocalForward 55443 localhost:443
  LocalForward 5580 localhost:80
  LocalForward 5588 localhost:8080
  LocalForward 5590 localhost:90
Host tenda-prod
  Hostname sawsautosegp01
  ProxyCommand ssh cofredesenhastenda -W %h:%p
  User deployer
  LocalForward 55443 localhost:443
  LocalForward 5580 localhost:80
  LocalForward 5588 localhost:8080
  LocalForward 5590 localhost:90
Host cofredesenhastenda
  Hostname 10.103.17.34
  User t_ifmiranda
  IdentityFile ~/.ssh/id_rsa
  IdentitiesOnly true

Zsh + Oh My Zsh

sudo apt-get install zsh

zsh --version

chsh -s $(which zsh)

Reiniciar PC

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Reinicia o terminal

cd ~/.oh-my-zsh/custom/plugins

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Adiciona o auto suggestions aos plugins

# plugins=(git zsh-autosuggestions)

PowerLevel10k

cd ~/.oh-my-zsh/custom/themes

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git

vim ~/.zshrc  

Adiciona o powerlevel10k ao tema

ZSH_THEME="powerlevel10k/powerlevel10k"

Gnome

sudo apt-get install chrome-gnome-shell

sudo apt install gnome-session

User themes extension

Tweaks

sudo apt install gnome-tweak-tool

Extensions

Caffeine
Dash to Dock

Temas

GTK3 Flat Remix Blue
Shell Flat Remix Blue
Adicionar em:

~/.themes

Icons Flat Remix
Cursor
Adicionar em:

~/.icons

Wallpaper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment