MMWD Blog

The cobblers shoes, err website.

Submitted by Micheas on Mon, 11/19/2012 - 21:37

Our latest website refresh has finally rolled out.

It's not done of course, we still need to convert the slideshow images and logo to the picture tag and the logo should really be converted into an SVG. We don't have an aural style sheet to keep the desktop and mobile websites from both appearing to screen readers, and a bunch of other things we'd like to do.

That said, we have finally dumped the mobile version of the site in preference of using a responsive theme.

Converting an existing project from css to SASS

Submitted by Micheas on Mon, 07/30/2012 - 14:43

You have probably heard about SASS. If not, click here, and read about it.

Once you read about it you will probably think "I'll try that on my next site."

Don't do that. Covert your current project to SASS right now. Well, not SASS, SCSS.

Unlike SASS, SCSS accepts valid CSS as input so you can use your current *.css files by just renaming them to *.scss.

Well, there is a little more to it than that, but not much more.

Clearing an entry from varnish

Submitted by Micheas on Tue, 02/28/2012 - 11:00

Varnish is a reverse proxy that allows you to fine tune your caching with all of the power of C.

Unfortunately, sometimes you need to tell varnish that one of the millions of files in the cache should be refreshed sooner than you would normally want.

Fortunately Varnish includes a untility called varnishadm that allows you to manually remove a single url from the cache, or even all the urls that match a regular expression.

Simple if statement to make sure that a php file is only run from the cli

Submitted by Micheas on Tue, 02/14/2012 - 15:10

When migrating a site to Drupal, or if your Drupal site has an external data source, it is common to have some custom php files that you only want run from the command line. (migrate users, import blog posts, get new bills, get new apps, etc.)

While it is a good idea to make sure that your webserver and reverse proxies won't run these files there is always the occasional human error. To catch the possible human error putting the following if statement at the beginning of a file is a solid fail-safe to keep the file from being run by visitors to your website.

Some basic Redhat/Fedora/CentOs commands for Debian/Ubuntu users

Submitted by Micheas on Fri, 02/10/2012 - 14:03

So you have only used Debian or Ubuntu as your lamp server and now you have your first RedHat based server.

While your familiar tools are a little different this cheat sheet should get you up to speed quickly enough.

Here is a quick Debian to Redhat translation of commands that you will probably run into hosting Drupal.