Skip to content

Instantly share code, notes, and snippets.

@ntorga
Created June 12, 2024 20:31
Show Gist options
  • Save ntorga/ae5d7803a5cfb5749d7359b236423a03 to your computer and use it in GitHub Desktop.
Save ntorga/ae5d7803a5cfb5749d7359b236423a03 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# The script will perform most of the steps, however, you must edit a few settings manually AFTER running the script:
#
# 1) Replace Whisker icon to "format-justify-fill";
# 2) Settings -> Apparence -> Select Dark theme and icons and enable toggle for matching xfce themes;
# 3) Settings => Keyboard => App Shortcuts => Add "/usr/bin/flameshot gui" => Print Screen => Keep Flameshot;
# 4) Reduce Workspaces to 1;
# 5) Configure energy settings to 15 min blank screen, 60min suspend;
# 6) Add the following itens to Whisker menu as favorites:
# Thunar, Brave, Firefox, Terminal, Xed, Calculator, FileZilla, Spotify
# 7) Clear bash and browser history.
#
# update system
sudo apt update && sudo apt upgrade -y
# install basic softwares
cd ~/
sudo apt remove -y hexchat pix rhythmbox hypnotix celluloid warpinator
sudo rm -f /etc/apt/preferences.d/nosnap.pref
sudo apt install -y curl git vim whois mtr htop telnet traceroute ufw \
vlc shotwell snapd filezilla autossh sshpass flameshot default-jre \
kazam byobu exfat-fuse ubuntu-restricted-extras
sudo ufw enable
ln -s /etc/profile.d/apps-bin-path.sh /etc/X11/Xsession.d/99snap
echo "ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" | sudo tee /etc/login.defs
snaps=( "spotify" "zoom-client" "postman" )
for snap in ${snaps[*]}; do
sudo snap install "${snap}"
done
curl -skL "https://update.code.visualstudio.com/latest/linux-deb-x64/stable" -o code.deb
sudo dpkg -i code.deb
rm -f code.deb
extensions=( "ms-kubernetes-tools.vscode-kubernetes-tools" "hashicorp.terraform" "foxundermoon.shell-format" "timonwong.shellcheck" "ms-azuretools.vscode-docker" "dbaeumer.vscode-eslint" "bmewburn.vscode-intelephense-client" "hbenl.vscode-test-explorer" "recca0120.vscode-phpunit" "ms-python.python" "github.vscode-pull-request-github" )
for ext in ${extensions[*]}; do
code --install-extension "${ext}"
done
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install -y brave-browser
# disable ipv6 and raise inotify limits
cat >~/sysctl.conf <<EOF
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
fs.inotify.max_user_watches=524288
EOF
sudo mv -f ~/sysctl.conf /etc/sysctl.conf
sudo sysctl -p
# install podman
sudo apt install -y software-properties-common uidmap podman
# -- process ends here, continue only if devs laptop --
# install php
sudo add-apt-repository -y ppa:ondrej/php
sudo apt -y update
sudo apt -y install php8.3 php8.3-xdebug php8.3-xml php8.3-intl php8.3-curl php8.3-mbstring
sudo systemctl stop apache2
sudo systemctl disable apache2
# install nodejs
curl -kL https://mise.run | sudo sh
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
mise use --global node@20
# install go
curl -kL https://go.dev/dl/go1.22.4.linux-amd64.tar.gz -o go.tar.gz
tar -C /usr/local -xzf go.tar.gz
rm -f go.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin:~/go/bin' >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment