Last active
March 24, 2020 11:19
-
-
Save acezalba/81a1aabe96765b02f0f6cbaae1920adf to your computer and use it in GitHub Desktop.
#sh ubuntu out of the box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #GIT | |
| #install git | |
| sudo apt-get install git | |
| #configure git | |
| $ git config --global user.name "Your Name" | |
| $ git config --global user.email [email protected] | |
| #install curl - CLI server transfer protocol | |
| sudo apt-get install curl | |
| #check commit history | |
| git log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # JS | |
| # nodejs: clone nodejs | |
| git clone https://github.com/nodejs/node.git | |
| cd node | |
| #nodejs: compile and install node | |
| ./configure | |
| make | |
| sudo make install | |
| #nodejs: check if nodejs works properly | |
| node -v | |
| #nodejs: run npm install script | |
| curl -L https://npmjs.org/install.sh | sudo sh | |
| #nodejs: check if npm works | |
| npm -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # maintenance commands | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get dist-upgrade | |
| sudo apt update # Fetches the list of available updates | |
| sudo apt upgrade # Installs some updates; does not remove packages | |
| sudo apt full-upgrade # Installs updates; may also remove some packages, if needed | |
| sudo apt autoremove # Removes any old packages that are no longer needed | |
| # option for all maintenance commands | |
| sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y' | |
| #install build essentials | |
| sudo apt install build-essential | |
| #install terminator | |
| sudo apt-get install terminator | |
| # instal virtualenv for environment isolation | |
| $ sudo apt-get install virtualenv | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # PHP | |
| # install composer prerequisites | |
| sudo apt install curl php-cli php-mbstring git unzip | |
| # install composer, dependency manager | |
| # project-based, installs dependency in local directory | |
| cd ~ | |
| curl -sS https://getcomposer.org/installer -o composer-setup.php | |
| #verify composer package @ https://composer.github.io/pubkeys.html | |
| HASH=<latest hash> | |
| # verify if installation script is safe to run | |
| php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| # install composer as system-wide command | |
| sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
| #test composer | |
| composer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # RUBY | |
| # Install RVM | |
| $ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
| # Install Ruby Dependencies | |
| $ sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev | |
| # Using rvm, check available ruby versions | |
| $ rvm list known | |
| # Using rvm, install Ruby version | |
| $ rvm install 1.9.2 | |
| # Using RVM, set a Ruby version as default | |
| $ rvm --default use 1.9.2 | |
| # Check Ruby and ruby gems version | |
| $ ruby -v | |
| $ gem -v | |
| # Update Ruby | |
| $ gem update --system | |
| $ gem update | |
| # install rails | |
| $ gem install rails | |
| $ rails -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment