David Lohmeyer's Blog

Hacking primal: How to not feel tired while reducing carbs

While I tend to focus on technology on this blog, I like to branch out a bit and give tips on improving health.  Computer geeks everywhere could most definitely use some healthy advice! I've posted a variety of articles on my low carb experience and losing 60 pounds over the course of 4-5 months, which you can view with the low carb tag of this blog.

Using SASS/Compass on Windows & Mac for CSS web design

If you're a CSS fan like I am, you've no doubt heard of CSS preprocessors such as SASS and LESS already. I see LESS mentioned more often outside of the Rails world, which really shouldn't be the case.  I feel like LESS has more overhead in the site/app itself, and is thus slower.

Low carb day 154: 59 pounds lost and 10 inches off the waist

I've been on low carb for a little over 5 months now. I started out at 235lb and am now at 176lb. In total, I've lost 59 pounds. I started with around a 43-44 inch waist and I now have a 34 inch waist. Here are some of the ridiculous things I've done and eaten on this "diet" (I'd consider my plan a rough guide on what to eat rather than a strict plan):

Font sizing in CSS: em vs. px vs. rem

I've been looking for ways to simplify my CSS development constantly.  I recently made the switch to using Compass/SASS full time in all of my projects due to its simplicity and more importantly the fact that you can create a base template for all of the wild CSS3 effects that require 5 different lines for each browser.

Low carb day 90: 43 pounds lost and my favorite low carb foods

As I mentioned in my December 11 blog post about how I'd lost 30 pounds, I've been dropping weight.  Today (day 90) I'm down 43 pounds total.  I started out at 235 pounds and now sit at 192.  This is nearly the lightest I've been in 13 years (I got down to 190 in high school).  Other than that one time I've been heavier than this since I was about 12 or so.  I've never been able to get rid of the gut, which is now in my sights thanks to low carb.  And it all happened in just 3 months.

Drupal vs. Joomla at ITWorld

ITWorld has a new article up about Joomla vs. Drupal and contains viewpoints of different developers.  I was asked by the author to give some insight on using either CMS so I'm in there around page two.  It's an interesting article because it's not from the perspective of one person and seems to cover many bases.

Using Drupal Webform submission data

The Webform Drupal module is an amazing thing.  It lets you build all sorts of amazing forms.  Combined with jQuery you can construct dynamic forms that improve user quality of life.  However, Webform's export features are extremely limited.  You can get a run-of-the-mill exported CSV with every component includes with the generic field name.  What if you want or require a different format or a variable number of submissions only?  It seems like the only real solution right now is to write your own app or module that reads Webform's data.

Quickly upgrade Drupal core: only different files

Here's a handy commandline snippet that will help you upgrade Drupal core (for example, 6.19 to 6.20) without having to replace everything.  It will only update the files that have changed.

Disabling the backspace key on a page with jQuery

I had an issue with a multi-page form recently where Internet Explorer would go back a page immediately upon hitting the backspace key.  If you accidentally do this while not in a text field you'll lose your form data.  Other browsers actually ask you if you want to resend data when you go back.  The solution was to disable the backspace key on my form page.  I accomplished this with the following Javascript (requires jQuery):

Redirect webform submissions to a dynamic URL in Drupal 6

If you need a way to redirect webform submissions to a dynamic URL in Drupal 6, using the Webform PHP module can work well with Webform 3.x.  I recommend only using post processing conditionals on select fields if possible with Webform PHP since you need to enable the permission to "use PHP for additional processing" for users who submit webforms (typically anonymous).

Here's the process: