Fake DNS Hosts with Behat with custom behat parameters

I was recently working on a Drupal project that had some internal DNS managed via hosts file. Tell me about it. Having no publicly accessible DNS or IP creates a challenge when your SaaS based Jenkins runs the tests.

The solution for this is a little custom work in your FeatureContext constructor and a BeforeScenario method.

And a little glue in the behat.yml to pass the custom hostHeader variable to the FeatureContext. Make sure that you're also setting the IP of the server for base_url and you're all set.

You can use this same pattern to pass around other variables from behat.yml to your FeatureContext.


My candidacy for the Drupal Association Board of Directors

For those of you who may not have heard, the Drupal Association is electing two new board members. You can read more about that at the Election 2013 page.

I participated in the first meet the candidates session. If you didn't have the chance to listen in my answers are available in text format and are posted below.

TL;DR - I want to be part of the DA Board because I want to help shape the future and growth of the community. Having worked with the DA in the past, through my organizational experience with CapitalCamp, I bring a different perspective that will help the overall governance of the DA. So please, vote for me!


Video & Slides: OMG DDoS - Drupal lessons learned the hard way

Last weekend I gave my session at the second annual Capital Camp, as you may have gathered from my last blog post. It was really well attended, despite the attendance being down due to Metro track work. The session went really well, there were a lot of great questions and follow-ups. I'm still answering emails, actually.

I think this goes to show that not a lot of people are well-versed in what to do when faced with a DDoS. I hope that other people pick up the torch here and I'd be glad to help anyone that is interested. I also plan on advance-ifying the session for PNW or BadCamp.

Slides for OMG DDoS - Drupal lessons learned the hard way
Video for OMG DDoS - Drupal lessons learned the hard way


Announcing OMG DDoS - Drupal lessons learned the hard way

My session on DDoS was accepted to Capital Camp! (Full disclosure: I'm an organizer of Capital Camp. I don't think my co-organizers had it in them to deny my session.)

I'm pretty excited to give this talk, as there doesn't seem to be a lot of info about Drupal and DDoS. You can find my session in the Grand Ballroom, Friday, July 27, 12:00 - 1:00 PM. It's setup as a beginner session, so all are welcome to attend. See you there.

Also, have you registered for Capital Camp yet?

xkcd comic


CDN module without a content delivery network

Modern web browsers put a cap on the number of connections they make to a host. This means if you've got a lot of assets on one hostname the browser will queue the remaining assets, while the ones in front download. This is referred to as blocking.

One way around blocking is to create multiple subdomains, for instance, and to increase the number of resources downloaded in parallel. This is method is called domain sharding and it is recommended by both Google's PageSpeed and Yahoo's YSlow.

I can't exactly afford a high quality CDN like Akamai but I can still leverage some of the benefits and fun of using a CDN. My friend Wim Leers wrote the Drupal CDN module, which you can leverage to do a little home grown sharding of your own.


Installing XHProf in MAMP for Drupal 6

XHProf is a hierarchical profiler for PHP. It reports function-level call counts and inclusive and exclusive metrics such as wall (elapsed) time, CPU time and memory usage. A function's profile can be broken down by callers or callees. The raw data collection component is implemented in C as a PHP Zend extension called xhprof. XHProf has a simple HTML based user interface (written in PHP). The browser based UI for viewing profiler results makes it easy to view results or to share results with peers. A callgraph image view is also supported.

So you're sold, but getting it installed in MAMP is kind of a pain.

A little about my setup system first. I'm running Mac OS X 10.6.4 with MAMP 1.9.2 with php 5.2.13 and you'll need Xcode.


Subscribe to RSS - Planet