Skip to content

Instantly share code, notes, and snippets.

View zuhairkareem's full-sized avatar
🏠
Working from home

zuhairkareem

🏠
Working from home
View GitHub Profile
@zuhairkareem
zuhairkareem / aggregation_css.md
Created March 23, 2018 10:11
Aggregation CSS loads old files in D7
@zuhairkareem
zuhairkareem / debug_drupal.php
Last active January 29, 2019 12:15
Show all errors drupal
Add in settings.php
$conf['file_temporary_path'] = '/tmp';
$conf['preprocess_css'] = 0;
$conf['preprocess_js'] = 0;
// To show all the errors
$conf['error_level'] = 2;
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
@zuhairkareem
zuhairkareem / fish_commands.md
Last active February 7, 2018 13:43
Fish shell commands

To set global paths

set -U fish_user_paths $fish_user_paths $HOME/.composer/vendor/bin /home/username/.rvm/gems/ruby-2.3.1/bin home/username/.rvm/gems/ruby-2.3.1@global/bin /home/username/.rvm/rubies/ruby-2.3.1/bin /home/username/.rvm/bin

Reload config

@zuhairkareem
zuhairkareem / lando_ubuntu.md
Last active May 2, 2018 08:14
Install Lando in Ubuntu

Install the Docker Community Edition for your Linux version. Visit https://get.docker.com for the "quick & easy install" script.(17.06.1-ce or higher)

Download the latest .deb or .rpm package from GitHub

Double-click on the package to launch Software Center

Click the "Install" button and enter your password when prompted

@zuhairkareem
zuhairkareem / deprecate_php.md
Created February 2, 2018 14:00
Deprecate PHP version in Ubuntu 16.04

Type the version

sudo update-alternatives --set php /usr/bin/php7.1
@zuhairkareem
zuhairkareem / d8_console_issues.md
Created February 2, 2018 11:33
D8 Drupal console issues

This seems to be an issue with the Drupal Console Launcher not being the same version as Drupal Console itself.

To fix it:

curl https://drupalconsole.com/installer -L -o drupal.phar sudo mv drupal.phar /usr/local/bin/drupal chmod +x /usr/local/bin/drupal

Then you can run:

@zuhairkareem
zuhairkareem / vhost_apache_24.md
Last active November 3, 2017 15:29
Virtualhost for Apache 2.4
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
 ServerName d8.local
@zuhairkareem
zuhairkareem / nginx.md
Created October 27, 2017 09:36
nginx config
sudo ln -s /etc/nginx/sites-available/nh.local /etc/nginx/sites-enabled/
sudo service nginx reload
@zuhairkareem
zuhairkareem / ubuntu_16_04.md
Last active October 11, 2019 07:45
Ubuntu 16.04 - Things to Install

Necessary PHP 7.1 extensions to be installed

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

Install Chromium

sudo apt-get install chromium-browser 
@zuhairkareem
zuhairkareem / command_ubuntu_common.md
Created August 30, 2017 09:25
Commands used commonly in Ubuntu

Import gzipped sql to db

zcat myfile.sql.gz | mysql -u root -ppassword mydb