Skip to content

Instantly share code, notes, and snippets.

@ntorga
Last active August 23, 2019 17:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ntorga/b49adce15dd8525ff1c84be2b559d9f6 to your computer and use it in GitHub Desktop.
Save ntorga/b49adce15dd8525ff1c84be2b559d9f6 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) a) Menu Whisker (the Start Menu) -> Properties => 90% opacity // Icon -> All Icons - Search "view-list-icons";
# b) Panel -> Panel Preferences => Row Size 48px;
# c) Windows Buttons -> Unmark "Show button labels";
# NOTE: I use 48px icons cause my screen is 4K.
#
# 2) a) Appearance => MacBuntu-Sierra-dark;
# b) Appearance => Fonts => Ubuntu // 8,5
# c) Window Manager => MacBuntu-Sierra-dark;
# d) Window Manager => Button layout (change to left);
#
# 3) Settings => Startup Apps => Remove Bluetooh.
#
# 4) Settings => Keyboard => App Shortcuts => Add "/usr/bin/flameshot gui" => Print Screen => Keep Flameshot.
#
# 5) If you are on a 4K screen, set Appearance => Fonts => DPI: 135.
#
# 6) Install OnlyOffice (optional).
#
# 7) Install Yubikey Login:
# sudo add-apt-repository -y ppa:yubico/stable && sudo apt-get update
# https://support.yubico.com/support/solutions/articles/15000011356-ubuntu-linux-login-guide-u2f
#
# NOTE: This script will reboot after installing NVIDIA drivers
# (DO NOT run this script if you don't use NVIDIA graphic card).
#
#remove default apps and install better ones
cd ~/
sudo apt remove -y pidgin libreoffice* thunderbird mousepad ristretto
sudo apt install -y vlc gedit shotwell ubuntu-restricted-extras
sudo apt install -y byobu exfat-fuse exfat-utils
#macubuntu (macOs visual for Linux)
sudo add-apt-repository -y ppa:noobslab/macbuntu
sudo apt-get -y update
sudo apt-get -y install macbuntu-os-icons-v1804 macbuntu-os-ithemes-v1804
cd ~/
wget https://www.wfonts.com/download/data/2015/10/29/lucida-grande/lucida-grande.zip -O lucida.zip
mkdir ~/.fonts/
unzip lucida.zip -d ~/.fonts/
rm -f ~/.fonts/sharefonts.net.txt
fc-cache -f -v
#dns
echo "dns-nameservers 1.1.1.1 8.8.8.8" | sudo tee /etc/network/interfaces
sudo mkdir -p /etc/resolvconf/resolv.conf.d/base
echo "options timeout:1 retries:1" | sudo tee /etc/resolvconf/resolv.conf.d/base
sudo systemctl restart NetworkManager
#chrome
wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i chrome.deb
sudo apt-get install -y -f
rm -f chrome.deb
#spotify
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get -y update
sudo apt-get install -y spotify-client
#filezilla
sudo apt-get install -y filezilla
#java (unfortunately not dead yet)
sudo add-apt-repository -y ppa:linuxuprising/java
sudo apt -y update
sudo apt -y install oracle-java11-installer
sudo apt -y install oracle-java11-set-default
# disable ipv6
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee /etc/sysctl.conf
sudo sysctl -p
# vscode
sudo apt install -y software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo add-apt-repository -y ppa:ondrej/php
sudo apt -y update
sudo apt -y install code php7.3 php7.3-xdebug php7.3-xml php7.3-intl
code --install-extension shakram02.bash-beautify
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension liximomo.sftp
code --install-extension imperez.smarty
code --install-extension mrorz.language-gettext
code --install-extension aequabit.php-cs-fixer
wget https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
sudo chmod a+x /usr/local/bin/php-cs-fixer
mkdir -p ~/.config/Code/User/
cat >> ~/.config/Code/User/settings.json << EOF
{
"php.suggest.basic": false,
"[php]": {
"editor.defaultFormatter": "aequabit.php-cs-fixer"
},
"php-cs-fixer.onsave": true
}
EOF
# franz
cd ~/
wget https://github.com/meetfranz/franz/releases/download/v5.1.0/franz_5.1.0_amd64.deb -O franz.deb
sudo dpkg -i franz.deb
sudo apt-get install -y -f
rm -f franz.deb
# skype
wget https://go.skype.com/skypeforlinux-64.deb -O skype.deb
sudo dpkg -i skype.deb
sudo apt-get install -y -f
rm -f skype.deb
#zoom
wget https://zoom.us/client/latest/zoom_amd64.deb -O zoom.deb
sudo dpkg -i zoom.deb
sudo apt-get install -y -f
rm -f zoom.deb
# virtualbox
wget https://download.virtualbox.org/virtualbox/6.0.8/virtualbox-6.0_6.0.8-130520~Ubuntu~bionic_amd64.deb -O virtualbox.deb
sudo dpkg -i virtualbox.deb
sudo apt-get install -y -f
rm -f virtualbox.deb
# useful tools
sudo apt install -y flameshot htop kazam autossh ncftp sshpass mtr vim curl git whois telnet traceroute mercurial
# csf
sudo rm -fv /usr/src/csf.tgz
sudo wget https://download.configserver.com/csf.tgz -O /usr/src/csf.tgz
sudo tar -xzf /usr/src/csf.tgz -C /usr/src/
cd /usr/src/csf/
sudo sh /usr/src/csf/install.sh
cd ~/
sudo sed -i 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf
sudo sed -i 's/RESTRICT_SYSLOG = "0"/RESTRICT_SYSLOG = "3"/g' /etc/csf/csf.conf
sudo sed -i 's/TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"/TCP_IN = ""/g' /etc/csf/csf.conf
sudo sed -i 's/TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995"/TCP_OUT = "1:65535"/g' /etc/csf/csf.conf
sudo sed -i 's/UDP_IN = "20,21,53"/UDP_IN = ""/g' /etc/csf/csf.conf
sudo sed -i 's/UDP_OUT = "20,21,53,113,123"/UDP_OUT = "1:65535"/g' /etc/csf/csf.conf
sudo sed -i 's/ICMP_IN = "1"/ICMP_IN = "0"/g' /etc/csf/csf.conf
sudo sed -i 's/IGNORE_ALLOW = "0"/IGNORE_ALLOW = "1"/g' /etc/csf/csf.conf
sudo sed -i 's/LF_LOOKUPS = "1"/LF_LOOKUPS = "0"/g' /etc/csf/csf.conf
sudo sed -i 's/ST_SYSTEM = "1"/ST_SYSTEM = "0"/g' /etc/csf/csf.conf
sudo sed -i 's/ST_ENABLE = "1"/ST_ENABLE = "0"/g' /etc/csf/csf.conf
sudo csf -r
sudo csf -a 8.8.8.8
sudo csf -a 1.1.1.1
# prevent sleep when lid closed and disable touchpad when mouse is connected
echo "HandleLidSwitch=ignore" | sudo tee /etc/systemd/logind.conf
sudo add-apt-repository -y ppa:atareao/atareao
sudo apt -y update
sudo apt install -y touchpad-indicator
# nvidia drivers
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt-get -y update
sudo apt install -y nvidia-driver-430 nvidia-settings
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment