drupal

Drupal CSS aggregator

A couple of pointers when you’re getting into theming Drupal the correct way rather than just hacking around as is most fun.

I seem to hit troubles getting the aggregator feature of Drupal working, and often end up just slapping an external CSS link call in to the page template.

The proper way to do is a little long winded, but gives us the speed optimisations offered by the aggregator facility. Instead of putting <link … /> in the page.tpl.php file, use the drupal_add_css() function in your template.php file.

The best place to put it is in a function called <themename>_preprocess_page().

And here’s an example of More >

nvidia

NVIDIA and suspend issues

I’ve got the nvidia proprietary video drivers running on my Fedora laptop using the rpmfusion-nonfree yum repo.

I also installed the akmod-nvidia package as it recompiles the kernel module for the graphics each time a new kernel is installed. Super!

However I’ve been battling with power suspend failing when slamming the lid on my laptop.. it hangs and won’t power off/restart without a nasty 10 sec power button press and hold. I think I’ve finally figured the problem. It seems the kmod-nvidia- tries to install as well.

A bit of the following and all seems well in sleep world!

yum remove kmod-nvidia-

In /etc/yum.repos.d/rpmfusion-nonfree-updates.repo add More >

New wordpress same old theme

I’ve just upgraded my wordpress install, and am very impressed. Really slick! ..and best of all it works with an iPhone app from which this post (of no use to anyone) has come

Sheesh it’s warm out!

Fetching mail with fetchmail

During a domain transfer, while DNS was still propogating I needed to retrieve mail from the old server to the new.

I did so thusly… # yum install fetchmail

$ touch .fetchmailrc $ chmod 600 .fetchmailc

I then added the following lines to .fetchmailrc

poll with proto POP3 user there with password "" is "" here

Then once ensuring you can POP3 out of the server (port 110) through the firewall, you can just run ‘fetchmail’ from the command line to grab the mail.

Topping it off with a cronjob for the duration of DNS propogation would probably be a sensible finish.

References:

http://theos.in/news/howto-configure-fetchmail-linux-or-unix-client-program-to-fetch-emails/

http://www.catb.org/~esr/fetchmail/fetchmail-FAQ.html

More >
Cross platform password safe

KeePassX on CentOS

Cross platform password safe

I’ve been playing with CentOS 5 lately, and really needed KeePassX on it. I ran into a few problems…

No rpms for Centos means you have to try and build from source. You also need qt-devel on the machine but it has to be version 4.3 or greater to compile.

So I had to enable atrpms-testing and use their bleeding edge qt44-devel.

This conflicts with qt-devel, so you need to ditch that first if it’s around. It also needed a few other dependencies that weren’t picked up.

# yum remove qt-devel qt4 dt4-devel # yum install gcc-c++ libXtst-devel.x86_64 qt44 qt44-devel

For some More >

Speedy wamp

To get a bit more speed out of your sluggish windows development machine (I use wampserver), add the following code to your php.ini.

; APC accellerator extension=php_apc.dll [APC] apc.enabled = 1 apc.cache_by_default = 1 apc.enable_cli = 0 apc.shm_segments = 1 apc.shm_size = 64 apc.max_file_size = 1M apc.stat=1

Also download the APC dll from here…

http://pecl4win.php.net/ext.php/php_apc.dll

and place it in your php ‘ext’ dir. Mine is here… D:\wamp\bin\php\php5.2.6\ext

Restart Apache and you should be a bit zippier.