Sharing via Samba Instead VirtualBox Shares

The performance was so largely effected by using the VirtualBox shares on Apache server that I had to find a better solution to share directories between my VirtualBox Dev environment that hosts servers,database,etc and my host machine Mac that hosts the editor software. I turn to Samba Service solution that does file sharing over the Network interface independent of VirtualBox Make Your Mac Sharing By default, the file sharing is not enabled in the Mac, …

Continue reading →

Looking at Drupal Performance with XProf and XHGui

Perhaps, your Drupal site is so slow that you cannot ignore it any longer and you have decided to look into the affects of the poor performance. In general, the affects of performance may be categorized into three categories each addressing different aspects of application such as Drupal: Code execution looks at the time code executes. Querying database looks at how much time it takes to query database. Load balancing looks at how your site …

Continue reading →

SendMail Email Server for Registration and Contact in Drupal

By default, Drupal uses php function mail() for sending email that instead uses the sendmail email server. So, in order for your email to work in Drupal you have to make sure the sendmail email server is installed and working on the server Locate Sendmail To see if sendmail is already installed and present: This should return path to the sendmail executable. If it doesn’t then you have to install. If it does, then continue …

Continue reading →

Setup Dynamic Virtual Hosts To Automize Drupal With WorkFlow

A tool WorkFlow has a new functionality “construct-container” that sets up a new container, so you can spin(i.e. drush spin-it) new Drupal instances automatically. Besides creating database, directories in file system, the construct container task also sets up and configures virtual host for the new Drupal instance. In this post, we cover the approach that was taken to provide multiple virtual hosts solution for WorkFlow tool users. The solution utilizes Apache module virtual_alias. To be …

Continue reading →

CKeditor, Stop Altering Elements!!!

CKEditor is very opinionated on what needs to be altered/removed. It parses and filters html too strict for our needs, so this post will cover how to loosen up CKeditor to stop removing/altering html. Before we move on, lets clarify that we can alter CKEditor behavior in 3 ways: From HTML – by adding attributes provided by CKEditor such as data-cke-survive, data-cke-filter, etc From Configurations – by changing CKEditor configurations in CKEDITOR.dtd From Implementation – …

Continue reading →

VirtualBox Gotchas

This is ongoing post listing different challenges and how those can be overcome when utilizing VirtualBox for your development needs 1. VirtualBox host only supports 32bit guest OS This was a problem on Windows 8 Intel processor machine that didn’t have vt-x enabled. The vt-x is feature of Intel processor that allows the virtualization of some kind. Once enabled, the VirtualBox host can load also 64bit Guest OS. To enable, boot Vindows 8 in BIOS …

Continue reading →

jQuery Snippets

Here are list of JQuery code snippets updated ongoing bases 0. Attach Custom Function to HTML Element Here, we put everything in parentheses so it executes on page load while passing jQuery object and assign it to “$” symbol. Afterwards, search the html element with class ‘image_button’ and assign click event with our function. This function grabs src from one element and swaps with another 1. How to find events attached to particular element the …

Continue reading →

How to Pass Variables Horizontally and Vertically in Drupal

There are some variables($node, $page,etc) you depend more than on anothers in Drupal. Its important to have access them when you need. In the following, we describe two ways -”top to down” and “left to right” to pass and accesses any variable at any part of the execution in Drupal Top to Down …or Vertical A good example, would be passing some variable from page scope to the node scope Since page scope calls theme …

Continue reading →

Scrap Emails From Gmail via Drush

In the following are steps to scrap emails from gmail account. We first archivete all emails into a file(.mbox). Then we run our custom drush command to scap all emails into output-email.csv file. At last, we use tool such as BriteVerify.com to filter only valid emails. Archive All Emails Go to Google Takeout and create archive file(.mbox) from your gmail account Scrap with Drush Once you have archive(.mbox) file, run the following drush command: This …

Continue reading →

Implementing Custom Drush Commands

In this post, we cover how to install and create your first custom Drush command Install Custom Drush Commands There are two steps to install any drush command: a) copy drushrc.php from /path/to/drush/example to your $HOME/.drush/ directory if not already present b) In the drushrc.php specify directory containing your drush cusotm commands This will import the directory where your custom drush function will reside. Lets create one Implementing Custom Drush Command Imlementing drush command can …

Continue reading →