├── README.md └── linux /README.md: -------------------------------------------------------------------------------- 1 | Laptop 2 | ====== 3 | 4 | Laptop is a script to set up an Ubuntu laptop for web development. 5 | 6 | It can be run multiple times on the same machine safely. 7 | It installs, upgrades, or skips packages 8 | based on what is already installed on the machine. 9 | 10 | For MacOS please use [https://github.com/thoughtbot/laptop](https://github.com/thoughtbot/laptop) 11 | 12 | Requirements 13 | ------------ 14 | 15 | We support: 16 | 17 | * Ubuntu 22.04.2 LTS 18 | 19 | Older versions may work but aren't regularly tested. Bug reports for older 20 | versions are welcome. 21 | 22 | Install 23 | ------- 24 | 25 | Download, review, then execute the script: 26 | 27 | ```sh 28 | curl --remote-name https://raw.githubusercontent.com/codica2/ubuntu-laptop-script/master/linux 29 | sh linux 30 | ``` 31 | 32 | What it sets up 33 | --------------- 34 | 35 | Unix tools: 36 | 37 | * [WINE] is a compatibility layer capable of running Windows applications 38 | * [Docker] for containers 39 | * [Snapd] canonical package manager 40 | * [Git] for version control 41 | * [OpenSSL] for Transport Layer Security (TLS) 42 | * [Guake] to replace a standart terminal 43 | * [Tmux] for saving project state and switching between projects 44 | * [Zsh] as your shell and [Oh-my-Zsh] as brilliant addons 45 | 46 | [WINE]: https://www.winehq.org/ 47 | [Docker]: https://www.docker.com/ 48 | [Snapd]: https://snapcraft.io/ 49 | [Git]: https://git-scm.com/ 50 | [OpenSSL]: https://www.openssl.org/ 51 | [Guake]: http://guake-project.org/ 52 | [Tmux]: http://tmux.github.io/ 53 | [Zsh]: http://www.zsh.org/ 54 | [Oh-my-Zsh]: http://ohmyz.sh/ 55 | 56 | Heroku tools: 57 | 58 | * [Heroku Toolbelt] and [Parity] for interacting with the Heroku API 59 | 60 | [Heroku Toolbelt]: https://toolbelt.heroku.com/ 61 | 62 | GitHub tools: 63 | 64 | * [Hub] for interacting with the GitHub API 65 | 66 | [Hub]: http://hub.github.com/ 67 | 68 | Media tools: 69 | 70 | * [Simple Screen Recorder] for screen recording 71 | * [ImageMagick] for cropping and resizing images 72 | * [VLC] media player 73 | * [Joxi] for screen capture 74 | 75 | [Joxi]: https://joxi.net/ 76 | [VLC]: https://www.videolan.org/vlc/index.html 77 | [Simple Screen Recorder]: https://www.maartenbaert.be/simplescreenrecorder/ 78 | 79 | Testing tools: 80 | 81 | * [Qt] for headless JavaScript testing via Capybara Webkit 82 | * [Ngrok] to expose a web server running on your local machine to the internet 83 | 84 | [Qt]: http://qt-project.org/ 85 | [Ngrok]: https://ngrok.com/ 86 | 87 | Programming languages and configuration: 88 | 89 | * [Bundler] for managing Ruby libraries 90 | * [Node.js] and [NPM], for running apps and installing JavaScript packages 91 | * [RVM] for managing versions of Ruby 92 | * [Ruby] stable for writing general-purpose code 93 | 94 | [Bundler]: http://bundler.io/ 95 | [ImageMagick]: http://www.imagemagick.org/ 96 | [Node.js]: http://nodejs.org/ 97 | [NPM]: https://www.npmjs.org/ 98 | [RVM]: https://github.com/sstephenson/rbenv 99 | [Ruby]: https://www.ruby-lang.org/en/ 100 | 101 | Databases: 102 | 103 | * [Postgres] for storing relational data 104 | * [Redis] for caching 105 | 106 | [Postgres]: http://www.postgresql.org/ 107 | [Redis]: https://redis.io/ 108 | 109 | Editors: 110 | 111 | * [Sublime Text 3] for developing 112 | * [VS Code] source code editor 113 | 114 | [Sublime Text 3]: https://www.sublimetext.com/ 115 | [VS Code]: https://code.visualstudio.com/ 116 | It should take less than 15 minutes to install (depends on your machine). 117 | 118 | ## License 119 | ubuntu-laptop-script is Copyright © 2015-2019 Codica. It is released under the [MIT License](https://opensource.org/licenses/MIT). 120 | 121 | ## About Codica 122 | 123 | [![Codica logo](https://www.codica.com/assets/images/logo/logo.svg)](https://www.codica.com) 124 | 125 | We love open source software! See [our other projects](https://github.com/codica2) or [hire us](https://www.codica.com/) to design, develop, and grow your product. 126 | -------------------------------------------------------------------------------- /linux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### end common-components/bash-shebang 3 | 4 | # Welcome to the codica laptop script! Be prepared to turn your laptop (or 5 | # desktop, no haters here) into an awesome development machine. 6 | 7 | RED='\033[0;32m' 8 | NC='\033[0m' 9 | 10 | fancy_echo() { 11 | local fmt="$1"; shift 12 | printf "\\n${RED}$fmt${NC}\\n" "$@"1 13 | } 14 | 15 | read -p "Enter your email to generate ssh key: " email 16 | 17 | fancy_echo "Installing git, for source control management ..." 18 | sudo apt install -y git 19 | 20 | fancy_echo "Installing libraries for common gem dependencies ..." 21 | sudo apt --ignore-missing install -y libxslt1-dev libcurl4-openssl-dev libksba8 libksba-dev libqtwebkit-dev libreadline-dev build-essential apt-transport-https ca-certificates gnupg-agent software-properties-common 22 | 23 | fancy_echo "Installing snapd canonical package manager" 24 | sudo apt install -y snapd 25 | 26 | fancy_echo "Installing VLC media player" 27 | sudo snap install vlc 28 | 29 | fancy_echo "Installing Postman API development environment" 30 | sudo snap install postman 31 | 32 | fancy_echo "Installing simple screen recorder" 33 | sudo apt install -y simplescreenrecorder 34 | 35 | fancy_echo "Installing Joxi" 36 | wget -q "http://dl.joxi.ru/linux/joxi-amd64.deb" 37 | sudo apt install -y ./joxi-amd64.deb 38 | rm joxi-amd64.deb 39 | 40 | fancy_echo "Installing sqlite3, for prototyping database-backed rails apps ..." 41 | sudo apt install -y libsqlite3-dev sqlite3 42 | 43 | fancy_echo "Installing Postgres, a good open source relational database ..." 44 | sudo apt install -y postgresql postgresql-server-dev-all 45 | 46 | fancy_echo "Installing tmux, to save project state and switch between projects ..." 47 | sudo apt install -y tmux 48 | 49 | fancy_echo "Installing guake, a super terminal" 50 | sudo apt install -y guake 51 | 52 | fancy_echo "Installing ImageMagick, to crop and resize images ..." 53 | sudo apt install -y imagemagick libmagickwand-dev 54 | 55 | fancy_echo "Installing curl ..." 56 | sudo apt install -y curl 57 | 58 | fancy_echo "Installing Redis ..." 59 | wget http://download.redis.io/redis-stable.tar.gz && 60 | tar xvzf redis-stable.tar.gz && 61 | cd redis-stable && make 62 | sudo cp src/redis-server /usr/local/bin/ 63 | sudo cp src/redis-cli /usr/local/bin/ 64 | 65 | fancy_echo "Installing Ngrok ..." 66 | wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip && unzip ngrok-stable-linux-amd64.zip && rm ngrok-stable-linux-amd64.zip 67 | 68 | fancy_echo "Installing Sublime Text 3 ..." 69 | sudo snap install --classic sublime-text 70 | 71 | fancy_echo "Installing VS Code ..." 72 | sudo snap install --classic code 73 | 74 | fancy_echo "Installing Unity Tweak Tool ..." 75 | sudo apt install -y unity-tweak-tool 76 | 77 | fancy_echo "Installing zsh and making it default shell..." 78 | sudo apt install -y zsh 79 | chsh -s $(which zsh) 80 | 81 | fancy_echo "Installing node, to render the rails asset pipeline ..." 82 | curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - 83 | sudo apt install -y nodejs 84 | 85 | fancy_echo "Installing RVM" 86 | gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E37D2BAF1CF37B13E2069D6956105BD0E739499BDB 87 | \curl -sSL https://get.rvm.io | bash -s -- --ignore-dotfiles 88 | echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile 89 | [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 90 | 91 | fancy_echo "Installing Ruby" 92 | sudo apt install -y ruby 93 | 94 | fancy_echo "Installing Heroku CLI client ..." 95 | curl https://cli-assets.heroku.com/install-ubuntu.sh | sh 96 | 97 | fancy_echo "Installing Heroku plugins ..." 98 | heroku plugins:install heroku-accounts 99 | heroku plugins:install heroku-config 100 | 101 | fancy_echo "Installing chrome ..." 102 | wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 103 | sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' 104 | sudo apt update 105 | sudo apt install -y google-chrome-stable 106 | 107 | fancy_echo "Generating ssh key" 108 | ssh-keygen -b 4096 -t ed25519 -f /home/user/.ssh/key-ed25519 -q -N "" -C "$email" 109 | sudo mv ~/.config/autostart/gnome-keyring-ssh.desktop ~/.config/autostart/gnome-keyring-ssh.backup 110 | ssh-add /home/user/.ssh/key-ed25519 111 | 112 | fancy_echo "Installing Docker" 113 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 114 | sudo add-apt-repository \ 115 | "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ 116 | $(lsb_release -cs) \ 117 | stable" 118 | sudo apt-get update 119 | sudo apt-get install -y docker-ce docker-ce-cli containerd.io 120 | 121 | fancy_echo "Installing Wine" 122 | wget -nc https://dl.winehq.org/wine-builds/winehq.key 123 | sudo apt-key add winehq.key 124 | sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main' 125 | sudo apt update 126 | sudo apt install -y --install-recommends winehq-stable 127 | 128 | fancy_echo "Installing oh-my-zsh ..." 129 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 130 | 131 | if [ -f "$HOME/.laptop-ubuntu.local" ]; then 132 | fancy_echo "Running your customizations from ~/.laptop-ubuntu.local ..." 133 | . "$HOME/.laptop-ubuntu.local" 134 | fi --------------------------------------------------------------------------------