Skip to content

Instantly share code, notes, and snippets.

@ricardopedias
Last active May 29, 2023 16:31
Show Gist options
  • Save ricardopedias/edca82ff90661c5ab194f5d002c296e0 to your computer and use it in GitHub Desktop.
Save ricardopedias/edca82ff90661c5ab194f5d002c296e0 to your computer and use it in GitHub Desktop.
Fedora + vscode + c++
#!/bin/bash
#
# google chrome
#
if [[ ! -f "/etc/yum.repos.d/google-chrome.repo" ]]; then
sudo dnf config-manager --set-enabled google-chrome
sudo dnf -y install google-chrome-stable
fi
#
# vscode
#
if [[ ! -f "/etc/yum.repos.d/vscode.repo" ]]; then
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
dnf check-update
sudo dnf -y install code fira-code-fonts
code --install-extension ms-vscode.cpptools-extension-pack
code --install-extension ms-vscode.cmake-tools
fi
#
# zsh
#
if [[ ! -f "~/.zshrc" ]]; then
sudo dnf -y install zsh util-linux-user
chsh -s $(which zsh)
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting;
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions;
cat <<EOF >> ~/.zshrc
ZSH_THEME="robbyrussell"
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
EOF
source ~/.zshrc
fi
#
# git
#
git config --global user.email "contato@ricardopedias.com.br"
git config --global user.name "Ricardo Pereira"
#
# github ssh
#
if [[ ! -f "~/.ssh/id_ed25519.pub" ]]; then
ssh-keygen -t ed25519 -C "contato@ricardopedias.com.br"
fi
echo "Copie a linha abaixo e cole em uma nova chave SSH de Autorização no URL https://github.com/settings/keys"
cat /home/ricardopedias/.ssh/id_ed25519.pub
if [[ -f "fedora-cxx.sh" ]]; then
rm -f fedora-cxx.sh
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment