Oct 24, 2016
Jul 22, 2016
It’s a fairly common pattern, in my experience, to prepare some routes for your express application in a separate file (module) and export them. Then they can be imported in a file that’s only responsible for putting your server together, with routes and middleware. It’s only one step removed from a solution I’m using in a current project in which I export a function that configures and returns a middleware. Something like this:
Aug 5, 2015
So I like building my custom modules in the test first fashion. In Drupal, to test de-coupled site functionality from custom modules, it’s conventional (and pretty easy) to use the built-in Simpletest. It provides some pretty neat Drupal-specific functions to help with creating and logging in users, creating nodes, etc. However, some of these functions are a little less than well-documented, but hey, it’s PHP. TDD is a product of my Ruby background because automatic test are valued in that community of developers, as evidenced by the many libraries and some of the test styles even creeping into other language communities, like Cucumber. In PHP, TDD is treated differently and isn’t as important, at least historically. So it only makes sense that the documentation would be a little weak, but anyway.
Aug 3, 2015
Just a quick heads up for those of you managing Red Hat Enterprise Linux servers out there that might run into the following error:
Mar 20, 2015
Have you ever wanted to post a tweet from a command line?
If you’re like me, you want to use twitter, but keep getting distracted by all the other tweets from the people you follow.
(That’s not just me, right?)
And, if you’re like me, you would like to use sferik’s command line suite ‘t’ but you’ve already got a utility named
t on your command line.
(I’m sure that’s also not just me, right?)