Golang tip of the day: admin dashboard and health checks in Beego applications
One litle-publicized feature of the BeeGo Go framework is its admin dashboard.FeaturesAlthough it may look quite raw visually (think MIME: text/plain), it contains a wealth of information about...
View ArticleGolang fun : adding methods to primitive types
Go syntax has some funny peculiarities which are not immediately obvious, like methods on primitive types. Let's have a look.Primitive wrapper typesAnyone with a few hours of Go is familiar with the...
View ArticleDebugging spammer mechanics
I've long been receiving quite high volumes of comment spam on this blog, which is why comments have always been pre-moderated. And, of course, there is usually not much to think of it. Not so with one...
View ArticleCalling methods on null objects in Go and PHP
Call a method on a nil pointer (null object) ? This is a classical bug. What if it somehow turned out to be a valid and useful construct in some languages, say in Go ? And what about PHP ?read more
View ArticleGo tip of the day : running tests for all subpackages recursively
If you program in Go, you've probably written a lot of packages, and probably split packages in subpackages. Maybe even more than idiomatic Go would really advise... And you may have been grumbling...
View ArticleDrupal 8 tip of the day : check menu links consistency
One of the interesting aspects of the revamped menu/links system in Drupal 8 is the fact that menu links are now in easily parseable YAML files, the "(module).links.menu.yml" in each module, in which...
View ArticleGolang tip of the day; PHP-compatible crc32
While porting (well, actually rewriting) an old PHP library to Go, I had to use a CRC (cyclic redundancy check) on a buffer. In old-school PHP, the standard is well established since PHP 4: just use...
View ArticleLogging for MongoDB
One nice thing during Drupal 7/8 development is the ability, thanks to the devel module, to get a list of all SQL queries ran on a page. As I've been working quite a bit on MongoDB in PHP recently, I...
View ArticleDrupal 8 tip of the day: autoloaded code in a module install file
Autoloading in D8 is much more convenient that in previous versions, however, it still has limitations. One such issue is with hook_requirements(), which is supposed to be present in the module install...
View ArticleMeteor tip of the day: Tinytest cheatsheet
I've been doing a lot more Meteor these days, especially working on Drupal 8 SSO with Meteor, and could not find a reasonably complete and up-to-date (for Meteor 1.1.0.3) list of the Tinytest...
View ArticleDrupal 8 tip of the day: replace hook_drush_command() by a YAML file
One of the big trends during the Drupal 8 creation has been the replacement of info hooks by two main mechanisms: annotations, and YAML files. In that light, hook_drush_command(), as the CLI equivalent...
View ArticleGit tip of the day : show the hottest files in a repo
When auditing or reviewing an unknown code base, I often have to decide which files to examine in priority. Beyond the usual heuristics for Drupal projects (hint: look at templates in D7), how can one...
View ArticleDrupal tip of the day: how to drop the Simpletest collections when using...
The problemWhen running tests on a server using the recent versions of the MongoDB module for Drupal, and more specifically the MongoDB simpletests, the simpletest runner may leave droppings in your...
View ArticleHow to add a server load graph to a Graylog dashboard
Graylog is, in the words of its creators, a tool to Store, search & analyze log data from any source, and it puts a lot of power in our hands to slice, dice, and generally combine, gather, and...
View ArticleMeteor tip of the day: Meteor environment variables
There are a lot of environment variables in any Meteor version. You probably know MONGO_URL and ROOT_URL, but how many others are there ? Do the Meteor guide and the Meteor docs reveal them all ? Guess...
View ArticleWhat to do when your Drupal site has been hacked
These are the slides of the presentation I gave yesterday at DrupalDevDays Milan.Life after the hack from OSInet, for Drupal Projectread more
View ArticleFaster Drupal sites with Queue API
These are the slides of the presentation I gave last week at DrupalDevDays Milan about the ways using Queue API can help you speed up Drupal sites, especially in connected mode. read more
View ArticleMongoDB 8.x-2.0-alpha1 released
On behalf of all contributors to the MongoDB module suite for Drupal over the years, I am pleased to announce the 8.x-2.0-alpha1 release of the MongoDB package for Drupal 8, six years after we started...
View ArticleDrupal tip of the day: how to display time and memory use for Drush commands
When you use Drush, especially in crontabs, you may sometimes be bitten by RAM or duration limits. Of course, running Drush with the "-d" option will provide this information, but it will only do so at...
View ArticleWhen PHP won't find existing source files
The mysteryThere are a number of issues on StackOverflow and elsewhere about the problems met when upgrading to PHP 7, so when I upgraded a Debian Wheezy server this week, I only upgraded to Jessie...
View Article