Skip to content

Instantly share code, notes, and snippets.

@johnny-aroza
Created December 13, 2018 05:36
Show Gist options
  • Select an option

  • Save johnny-aroza/27bec77d496a63507b2da8aec44da7a7 to your computer and use it in GitHub Desktop.

Select an option

Save johnny-aroza/27bec77d496a63507b2da8aec44da7a7 to your computer and use it in GitHub Desktop.
ubunutu backup
<h2>Necessary PHP 7.1 extensions to be installed</h2>
```
sudo apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached php7.1-xml
```
<h2>Install Chromium</h2>
````
sudo apt-get install chromium-browser
````
<h2>Install Firefox</h2>
````
sudo apt-get install firefox
````
<h2>Install composer</h2>
````
sudo apt-get update
sudo apt-get install curl php-cli php-mbstring git unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
````
If there are any composer cache error
````
sudo chown -R $USER $HOME/.composer
````
<h2>Install Drush 8.x in Ubuntu 16.04</h2>
````
sudo composer global require drush/drush:8.x
// Make drush command globally available
export PATH="$PATH:~/.composer/vendor/drush/drush:/usr/bin"
OR
sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
source $HOME/.bashrc
````
Fatal error: Call to undefined function cache_get()
https://drupal.stackexchange.com/questions/43971/fatal-error-call-to-undefined-function-cache-get/160347
````
if (!function_exists('cache_get')){
debug_print_backtrace();
}
$implementations = cache_get('module_implements', 'cache_bootstrap');
````
Request to js/admin_menu/cache/% generates page not found - error OR some other redirect error - Enable apache rewrite module
````
sudo a2enmod rewrite
sudo systemctl restart apache2
````
<h2>Install Compass in Ubuntu 16.04</h2>
```
[https://gist.github.com/stephou0104/233b5c99884f1d8c8b8b#file-ubuntu-compass-ruby]
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.3.1
rvm use 2.3.1 --default
gem install compass
```
If there are libssl-dev errors - ref - https://askubuntu.com/questions/630439/libssl-dev-version-dependency-conflict-with-installed-libssl1-0-0/892032
Run this command
````
apt-cache policy libssl-dev
apt-cache policy zlib1g-dev
````
Get the candidate release version and install it
````
sudo apt-get install libssl1.0.0=1.0.2g-1ubuntu4.6
sudo apt-get install zlib1g=1:1.2.8.dfsg-2ubuntu4
````
<h2>Install Sublime text 3</h2>
````
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
````
Uninstall sublime text 3
````
sudo apt-get remove sublime-text && sudo apt-get autoremove
````
<h2>Install Atom Text Editor</h2>
````
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
````
<h2>Install PhantomJS in 16.04</h2>
https://www.vultr.com/docs/how-to-install-phantomjs-on-ubuntu-16-04
Step 1: Install PhantomJS
Before installing PhantomJS, you will need to install some required packages on your system. You can install all of them with the following command:
```
sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y
```
Next, you will need to download the PhantomJS. You can download the latest stable version of the PhantomJS from their official website. Run the following command to download PhantomJS:
```
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
```
Once the download is complete, extract the downloaded archive file to desired system location:
```
sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
```
Next, create a symlink of PhantomJS binary file to systems bin dirctory:
```
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
```
Step 2: Verify PhantomJS
PhantomJS is now installed on your system. You can now verify the installed version of PhantomJS with the following command:
```
phantomjs --version
```
<h2>Make the command line cool with fish & bobfish theme</h2>
https://blog.devopscomplete.com/fishing-with-bob-the-fish-2decd3a2f87
````
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish git
// Add Fish to /etc/shells with the following command
echo `(which fish)` | sudo tee -a /etc/shells
//To set fish as default shell - takes affects after logout/login
chsh -s `which fish`
curl -L http://get.oh-my.fish | fish
omf install bobthefish
// Probably these font will not work in Ubuntu Gnome terminal
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v1.0.0/FiraCode.zip
sudo unzip FiraCode.zip -d /usr/local/share/fonts/
sudo fc-cache -fv
// in Gnome terminal, Glyphs like =,<, > will not be supported by Fura Code NF Regular,
// so install Fira Mono For NerdFont Mono Regular
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v1.2.0/FiraMono.zip
sudo unzip FiraMono.zip -d /usr/local/share/fonts/
sudo fc-cache -fv
// Remove date from right side of fish shell
set -U theme_display_date no
set -U theme_nerd_fonts yes
// Abbreviate the git project directory when inside a git repo
set -U theme_project_dir_length 1
````
After executing the commands, change the font.
1) Open the Edit menu and click Profile Preferences
2) Select Custom Font
3) Select one of the installed Nerd Fonts (Fira Mono For NerdFont Mono Regular) - All Glyphs Gnome Terminal.
Font Issue (Support for ligatures in terminal is bad)
https://github.com/tonsky/FiraCode/issues/247
https://github.com/tonsky/FiraCode/issues/162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment