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
<?PHP
MYSQL -UROOT -PROOT DB > DBLOCAL;
?>
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
@shamsher327
shamsher327 / JavaScript info
Created December 7, 2018 12:18
Javascript Tuts
https://javascript.info/
$user = \Drupal\user\Entity\User::load(2131);
$user->addRole('administrator');
$user->save();
@shamsher327
shamsher327 / gist:23c8453e10a60e31773b3b0c7b119e72
Created February 13, 2019 15:56
Drupal composer git repo
Drupal composer git repo
composer config repositories.drupal composer https://packages.drupal.org/8
@shamsher327
shamsher327 / gist:45b7a453b11bae48ab609fd6496d18df
Created February 19, 2019 04:45
Admin User login with code
$uid = '1';
$user = Drupal\user\Entity\User::load( $uid );
user_login_finalize( $user );
$response->send();
composer config --global secure-http false

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)