Acquia Certified Developer Exam: Review and Tips

  I have just completed my Acquia Certificatied Developer Exam.  Initial words, it was harder than I expected.  I did well on the exam but I wasn’t 100% sure on some of the questions, which left open some gaps and uncertainty when I pressed that “Submit Exam” button.  It’s not easy to study for this exam, and they tell you this.  The best way to prepare is just to have experience.  I would agree with that statement.  One other missing piece, is there isn’t a lot of sample questions out there so it can be hard to know what to expect when you’re in the exam. Preparation...


Best Cheap Drupal Hosting on a Private VPS Server

There are too many hosting options out there count, and some offer extremely low prices. However, with those low prices, comes a low quality of service. It’s also quite common that with this low price tag you are locked into a yearly deal. If you site out grows your hosting you will be forced to move into the more expensive tier, when that happens, your cost savings go out the window. Been there, done that. Now all my sites are hosted on Digital Ocean. Here you can get a fully accessible Drupal site up and running in under 55 seconds for the low cost of $5 a month. Why I love Digital Hosting...


Drupal 7: Big cron tasks? Spread them out.

If you’re building a module that relies on the Drupal cron to do heavy work for you, it might be better idea to split up the task into chunks to share the load. Let’s say you have a single cron task that has some heavy database work, that could take the cronjob over a minute to execute. Here is a little algorithm you can put into place to help lighten the load on each run. We need to assume a couple things, but these can be easily adjusted for your case. First we have to assume the table has an incremental index like a primary key, if it doesn’t there is another way to do this, but most...


Add HTTPS (SSL) to Your Drupal 7 Site on Linux/Apache

1. Getting your SSL Purchase a new SSL from a registrar, I use NameCheap, you can get a simple PositiveSSL from Comodo for $9.00/year. After your purchase is complete, you will need to generate a key and csr from your server. # sudo mkdir /etc/apache2/ssl # sudo openssl req -nodes -newkey rsa:2048 -keyout websiteurl_com.key -out websiteurl_com.csr The key file is used later, and the csr file is used to generate your SSL certificate. Finish the process and wait for your certificate to arrive in a zip file to your email address. Place all those files in your /etc/apache2/ssl directory. 2....


Drupal 7: Lock/Password protect our site from anonymous users and add login/register block

There are a few ways to do this, probably the most common way is to put your site in maintenance mode and edit maintenance-page.tpl.php. This method works well and can produce the desired results, however, it’s not the proper way of doing things. What if you still want to have the use of maintenance mode for it’s intended purposes. Well this could still work, but you’re going to have to fiddle with the permissions each time. Also the maintenance mode message will appear on your site, so that will have to be removed and if you want it back, you’re going to have to edit code. Here is...


Drupal and Drush: Import/Export SQL Database with Drush

Moving sites from one server to another can be a tedious task, however with command line and drush we can simplify this task into a few easy steps. Export the database # drush cc all && drush cc all # drush sql-dump > /tmp/website-dump.sql Clearing the cache first removes unwanted cached tables which make the SQL file quite large and can also cause problems on import with the “MySQL Server Gone Away” errors Copy the database over to your other server You can use whatever method you like (FTP, etc) but to keep things on the command line, let’s use secure copy. # scp...


Responsive Twitter Widget

Grab your twitter widget. Add this to your CSS file. .twitter-widget-0 { width: 100%; } Done.


Drupal 7: Basic Drush Commands

If you have SSH (command line access) to your Drupal website, then drush is a must.  Here are a few of my favourite and most useful Drush commands. 1. Clearing the cache with drush When developing clearing the cache can save a lot of headaches, however doing it through the user interface takes it’s time and using drush helps to speed up this process. drush cc all It is also possible to pick the specific cache you wish to clear but most of the time I am using this command in development and clearing all the caches works perfectly. 2. Downloading and enabling modules with drush This is one of...


Building Search Queries for Twitter's REST API 1.1

I recently need to get a JSON object from Twitter's API that had a couple of requirements. I needed the most recent tweets that contained a specific hashtag OR were from a specific user AND didn't contain any retweets. Starting with the base API URL for search https://api.twitter.com/1.1/search/tweets.json Then appending each piece of the search as required https://api.twitter.com/1.1/search/tweets.json?q=from:example https://api.twitter.com/1.1/search/tweets.json?q=from:example OR #example https://api.twitter.com/1.1/search/tweets.json?q=from:example OR #example + exclude:retweets Then a...


GitHub Release: TwitterRSS-Enchancer v2

https://github.com/cvanderlinden/TwitterRSS-Enhancer Scope: Accesses the Twitter API 1.1 timeline status and authenticates with OAuth. Then takes each status and rewrites them to link @usernames to their profiles, #hashtags to their appropriate search, and links to their destination. Also includes time ago and author accreditation. A much needed update to my TwitterRSS Enhancer. This version now includes OAuth, without the need for PHP OAuth libraries. You need to create a Twitter application on to get your OAuth keys and access tokens. Once you have that, you can fill in the blanks on...