Skip to content

Instantly share code, notes, and snippets.

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

Shamsher Alam shamsher327

🏠
Working from home
View GitHub Profile
Ref :- https://drupal.stackexchange.com/questions/95897/apache-solr-4-6-0-installation-and-compatibility-with-drupal7/124038#124038
You aren't alone I had to scower the internet and read several articles before I truly understand all of this. I tried about three different methods until I finally got it right!
If you are using Debian/Ubuntu (with Tomcat7) it's even easier then most outline. I preferred this over Lullabot since when you install it through Ubuntu it's actually a service and less fiddling :)
Install Java
apt-get install java7-jdk
Install Tomcat
# Ignore emacs backup files...
*~
# Ignore configuration files that may contain sensitive information.
sites/*/settings.php
# Ignore paths that contain user-generated content.
.sass-cache/*
sites/*/files
sites/*/private
@shamsher327
shamsher327 / drupal8-links.php
Created October 31, 2017 16:53 — forked from colorfield/drupal8-links.php
Drupal 8 links, or where is my l() function

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@shamsher327
shamsher327 / content_moderation.install
Created March 23, 2021 08:07 — forked from jhedstrom/content_moderation.install
Custom content moderation update hooks from 8.2.x to 8.3.x
<?php
/**
* @file
* Install file for content_moderation.
*/
use Drupal\content_moderation\Entity\ContentModerationState;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Database\Database;