David Lohmeyer's Blog

Side Projects Keep Things Fresh

I've been having fun maintaining my side web design and development "business". It keeps things interesting outside of work since I love making cool things and helping smaller businesses with their online presence. I started hosting client sites earlier this year while I previously used shared plans for side projects and I think it's one of the better decisions I've made. The control of having a VPS that just works without messing with clunky shared plans is liberating.

Sorry, Web Design isn't Dead

I fell for the link bait title. A recent article on UXMag points out why the author thinks web design is dead in 2015.

Check out DigitalOcean for hosting

I've been using Hostmonster for probably 10 years to host my simple personal site and other random projects that come up.  Shared hosting is a convenient thing and is a great solution for people that want a normal website.

Stop Confusing Future Web Developers

Stop for a second.  Have you heard of tools like Jade (an HTML preprocessor) or Stylus (a CSS preprocessor)?

Can we use Flexbox safely yet?

The flex box model, aka Flexbox, will make designing layouts in CSS and HTML a lot easier once it hits mainstream.  How close is it to being widely supported?  It's actually not too bad, with global support at 88.88% as of 3/2/15.  The main issue is with versions of Internet Explorer earlier than 10.  Modern Chrome and Firefox, as well as mobile browsers almost all support Flexbox.  Since this is a new tool that will likely be employed in CSS frameworks of the future, it's useful to know how and why it will happen.  Here are a few good links.

Building a custom arcade (MAME) machine

Last August I took the plunge and decided to build my own custom MAME arcade cabinet.  See my build thread here. I wanted to use this as a learning experience in woodworking.  Here are a few things I learned building off of the plan posted at Arcadecab.com

Website Update

My personal site has been updated.  It's been a few years and it was definitely time to freshen things up.

One thing is notably missing: my old Team Fortress 2 levels.  I'll try to get a compilation blog post of those up shortly.

Repeating blocks of template code in Drupal 8

I've had some trouble using Twig's include statements in Drupal 8 theming.  I'm not sure if this is a bug since it's at Beta 4, but it's sort of annoying.  I include my content areas in page.html.twig in a separate include file in Drupal 6 and insert it into the area I need.  For example, if I have a 3 column layout, I'm changing the Bootstrap classes from "col-md-12" to "col-md-9" and "col-md-3" (for a sidebar) if the sidebars have content in them.  Includes are apparently escaping (?), though, and not printing anything other t

Print your theme's logo path in Drupal 8 with Twig

I'm updating a Drupal 6 theme to Drupal 8.  One thing I'm doing is making the logo in my Twig template a Twig variable instead of hardcoding the path.  Here's how you do it.  This assumes a theme named 'acton', but you'll change that to your own theme's name.

In 'acton.theme', assuming your logo is 'logo.png' in your theme's root:

function acton_preprocess_page(&$variables) {
  $variables['logopath'] = '/' . drupal_get_path('theme','acton') . '/logo.png';

In your Twig template, do something like this:

Using Wordpress with Amazon S3 and Git

When you get into larger Wordpress sites that have a very large /wp-content/uploads folder, things start to get a little hairy if you're using Git.  Best practices with Git say to not have binaries like images and media files under version control in order to keep your code base clean, but then it means we can't really use Git for backing up production files like images.

So what do we do?  Setting up an Amazon S3 cloud sync is an obvious answer since S3 is meant to store files.

A few tools can help with this.

Related Posts