Skip to content

Instantly share code, notes, and snippets.

View kruchai's full-sized avatar
🇺🇦
Be brave like Ukraine

Oleg Kruchai kruchai

🇺🇦
Be brave like Ukraine
View GitHub Profile
@kruchai
kruchai / bootstrap_theme_generate.sh
Created November 11, 2016 14:19 — forked from kaido24/bootstrap_theme_generate.sh
Generate Drupal 8 Bootstrap LESS prepared subtheme with grunt config.
#!/bin/bash -x
echo Are you at themes folder y/n?
read IS_THEME_FOLDER
if [ $IS_THEME_FOLDER != 'y' ];then
exit
fi
if ! [ -d bootstrap ];then
drush dl bootstrap
fi
@kruchai
kruchai / site.conf
Last active November 7, 2016 16:23
Apache2 config file.
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName site.loc
DocumentRoot /var/www/html/site
// For clean URL`s in drupal7.
<Directory /var/www/html/>
AllowOverride All
Allow from all
@kruchai
kruchai / sc-config-1.txt
Last active November 21, 2016 10:16
How to configure host on Nginx and import db.
# Create new Nginx localhost config.
scout@scout-machine:/etc/nginx/sites-available$ sudo cp d7 [YOUR_CONFIG]
# Create a link from available to enable.
scout@scout-machine:/etc/nginx/sites-enabled$ sudo ln -s /etc/nginx/sites-available/[YOUR_CONFIG]
# Edit a hosts. You must added your new hostname.
scout@scout-machine:/etc/nginx/sites-enabled$ sudo nano /etc/hosts
@kruchai
kruchai / settings.php
Last active November 10, 2016 20:40
Drupal 7 local settings.php example file.
<?php
// To set up a local environment, make a duplicate of this file and name it
// local-settings.inc in the site directory that contains the settings.php file.
// Ignore sites/*/local-settings.php in the .gitignore file. Change the settings.php
// file to include local-settings.php if the file exists.
// Point database to local service.
$databases['default']['default'] = array(
'database' => 'local_db_name',
'username' => 'root',