Howto

My Mac told me it was 4:20

To get your apple computer to verbally remind you everyday at 4:20 that is 4:20, you need to set a crontab with a say command.
In your terminal run the command: sudo crontab -e. Then enter the following line:

20 16 * * * say -v fred 'what time is it?'; say '4 20'

enjoy

Drupal 7 Ubercart Recurring Payment Cancellation Rule

For a current Drupal 7 project that uses Ubercart and Ubercart Recurring to provide for a subscription service, I need the ability for an admin user to be able to cancel a user's ongoing recurring fee when a subscription level is changed. I accomplished this with the following php rule:

<?php
// load all recurring fees for a user
$recurring_fees = uc_recurring_get_user_fees($user_uid);
// loop through fees
foreach ($recurring_fees AS $fee) {
// cancel each fee
uc_recurring_fee_cancel($fee->rfid);
}
?>

Drupal 7 'Add to Cart' Rule for Ubercart

On a current site in development I am using Ubercart to provide a renewable subscription service. To make the user experience clean, I wanted to protect the user from going 'shopping' to add their subscription. To do this I decided to use a rule to add the product to the user cart when the user is created by an administrator or when the subscription is cancelled or fails payment. I tried the Ubercart Rules module, but this is mainly for dealing with orders and not carts, and did not contain the needed add to cart rule.

Disable Incompatible GrowlMail Plugin in OSX 10.8

After upgrading to OSX 10.8, I no longer needed Growl installed because of the built-in notification system. After uninstalling Growl, I fould that GrowlMail was still installed and was keeping my Mail program from starting automatically. You can remove this plug-in manually by turning off mail, and then removing ~/Library/Mail/Bundles/GrowlMail.mailbundle

Homegrown Drupal 5 Webform SPAM Filtering

One of my clients started getting massive amounts of SPAM through his web form created contact form. Since this contact form is displayed as a block on ever page, I didn't want to put in an obtrusive captcha. I did try the hidden captcha module, but found that it is already automated against. I decided to hit it straight on and wrote a snippet of code to not submit, but error instead, when the body contains the http prefix.

Getting Growl Running with Mac Mail 4.5

If you haven't installed Growl yet on your Mac to handle notifications, then you should do it now. And if you did have it installed, you probably saw it disappear during the last system update numbered 10.6.7, which updated Mail to 4.5. As for now, there is not an official release of Growl for the newest release of Mail (or the previous Mail 4.4), so to get it all running you are going to need to do a little poking around the preference files. The good news is that the only change needed is to simply tell the growl plugin that it is compatible with the newest version of mail.

Getting Growl Running with Mac Mail 4.4

If you haven't installed Growl yet on your Mac to handle notifications, then you should do it now. And if you did have it installed, you probably saw it disappear during the last update of Mac Mail. As for now, there is not an official release of Growl for the newest release of Mail, so to get it all running you are going to need to do a little poking around the preference files. The good news is that the only change needed is to simply tell the growl plugin that it is compatible with the newest version of mail. NOTE: Mail 4.5 has been released and instructions for installing growl can be found at: http://baxwrds.com/fix_growl_mail

Using an O2 Huawei E1750 USB 3G Modem with Snow Leopard in Prague

On my most recent trip to Prague, I needed to secure relatively hi-speed internet on a month by month basis, without waiting the 2 weeks required to DSL your home line. A home line that I didn't even own. Before my arrival my wife got a vodafone cellar modem for me, which worked right out of the box and came with a month free trial with deposit. This sounded exploitable, except the 2gb limit (in a month) ran out fast, and from there Vodafone requires 6 month contracts. I did a little research and found that O2 has an English speaking store and a day by day prepay contract. Awesome.

I get the modem, run to my soviet-era panel building and plug the modem in. Nothing. Nothing at all.

Up with the Google Fonts Module

After being alerted to Google Fonts, the Google Font API, and the Google Fonts Module in a recent Drupal Planet post (http://acquia.com/blog/robert/google-fonts-api-time-drupal-market-one-day), I dropped my lunch and said, "Rad!" Then I rolled up the sleeves and dropped a few fonts into my blog as easy as the dog drops logs on the lawn. What follow is usage notes and examples on getting this all going for yourself:

How-to wrap your CSS Injector files into a new Zen sub-theme

I frequently use a 3rd party designer to help with the tedious task of going from PSD to final theme. If you haven't realized it yet, but alot of designers have problems setting up a local MAMP install w/ drupal in which to fuck with css. To deal with this without giving the designer any command-line access, my shop uses what we call CZI on all drupal installs. This stands for CSS Injector, Zen theme, IMCE, and allows a designer to upload images and apply css rules to a development site they have been given permissions for on the theme, Zen, that provides all the classes and ids anyone would need.

After my shop, the designer, and the client are satisfied, CSS Injector and it's external files become a weight and need to be removed. Below I detail the process of using Zenophile (http://drupal.org/project/zenophile) to create a zen subtheme in which to wrap up all your CSS Injector files:

Syndicate content