User login

Public

Slick top-level-domain style URLs for your local development sites on Ubuntu (and Mac OS X running Ubuntu in a VM)

In order for the cool myprojectname.dev style addresses for sites you are developing locally (rather than 127.0.0.1/myprojectname) from my Mac OS X environment as well as Ubuntu running in a virtual machine, this method uses the IP address available locally that you can find out by typing ifconfig in a shell terminal. It's what follows the text "inet". With luck that is a stable IP address, running in bridged mode (i think) with VMWare Fusion this seems to be working so far. The problem with bridged mode is that it only works with your own internet connection.

CSS aggregation with Zen-based theme caused one particular server to stop serving Drupal pages

Weirdest. Server. Drupal. Zen. Bug. Ever. Our client's site suddenly stopped working. With a server error.
Safari can’t open the page. Safari can’t open the page “http://www.example.com/landing” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.
Opera was just a blank white screen. But other sites on the server were still working.

Strip non-numeric characters from a string with PHP Perl-style regular expression

<?php
$numbers_only_string = preg_replace('/\D/', '', $string);
?>

Yeah, that there's a regexp character for "not a digit". Craziness.

Features module notes

  • Features Extra block (fe_block) does not export block cache settings (from the contrib module).
  • Views export is either broken or, more likely, it knows when they are already defined by a module.

Get a Git diff of the previous commit

Getting a diff (patch-file style display of changes) from a your most recent commit is useful when you commit and it lists three lines changing in a file instead of one. Of course, you should have run git diff --cached before git commit -m "I know what I'm doing.", but when you haven't, or have another reason to take one step back in the history of your work, here is the command that saves looking up the git commit hash.

git diff HEAD^ HEAD

Syndicate content