404 Errors On Pagespeed Generated JS & CSS

To improve performance of the SBGrid Web site I’ve been using Google’s Pagespeed Module for Apache. There is a module available for both Apache & NGinx, and  it can improve the performance of a Web site using a number of methods such as minimizing the number of JavaScript and CSS files that need to be downloaded.

We were seeing random 404 errors on Google Pagespeed auto-generated JavaScript and CSS files on the SBGrid’s Web site. These would only occur after the Web server was running for 2 days or more.

The fix for us was to increase Pagespeed’s caches and to give the host (it’s a VM) more RAM.

These are the values that we set:

  • ModPagespeedFileCacheSizeKb
    • Set the target size (in kilobytes) for file cache.
  • ModPagespeedLRUCacheKbPerProcess
    • Set the total size, in KB, of the per-process in-memory LRU cache.
  • ModPagespeedLRUCacheByteLimit
    • Set the maximum byte size entry to store in the per-process in-memory LRU cache.

This is what we set them to:

ModPagespeedFileCacheSizeKb 102400
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384

Use these with care and make sure that your host has enough RAM to fit everything into memory without paging.

Original Image from my Flickr Feed.

References:

 

Python-LDAP: List the Group Membership of a User

Python-LDAP: List the Group Membership of a  User

Unless your an LDAP expert it’s not obvious how to find the groups a user is member of, and that also describes how you need to tackle this problem.

This code makes a lot of assumptions and also assumes that a user’s UID is named ‘uid’.

If there’s a better way to do this, let me know.

References:
This thread on the Python-LDAP mailing list was quite useful:

My Popular Flickr Pics.

Scout: Find your photos in Flickr's Explore pages

1. Pics of snow!, 2. Ivy Escapes, 3. Duck at sunrise, 4. Boston Twilight, 5. Main Street, Donegal Town. 1930’s, 6. Donegal Town: The Diamond 1973, 7. Celtic Sprially Wrought-iron, 8. Frozen Bog Puddle,

9. Boston Sunset, 10. Maghery, 11. Sunset, moonrise at Canada Lake, NY, 12. Under Lough Eske Bridge, 13. Fred & Blizzard, 14. Celitc Spirally Wrought Iron, 15. Big Waves, 16. The Atlantic near Dungloe, Donegal Ireland,

17. Donegal Town: The Old Castle, 18. Donegal Bay, 19. Old Donegal Town Postcard

 

Thanks to  bighugelabs.com

The Nokia 6230!

Nokia 6230i
Nokia 6230i

Do you remember when a phone like the Nokia 6230 was the phone to have? I remember trying to get one of these for use in the US after seeing a friend’s phone in Ireland. At the time you could only get this model on the Cingular network and the things cost hundred. This phone was a classic for it’s time and it was durable and just worked and it’s form-factor is a classic from the period.

GSMarena has specs on the phone, and Wikipedia has a badly written page about. Those things sold for hundreds of pounds/euros/dollars when they were new in 2005, now you can get one on Ebay for less than 20 quid.

And these days you can an Android phone on Amazon for as low as $30 that’s more powerful that a 2005 era laptop. And you know, I still want this phone, the only problem is I can’t read the screen as it’s too small!

Build & Install Osra 1.3.8 on Ubuntu 11.10

Summary

Osra is a a utility designed to convert graphical representations of chemical structures create by Igor Filippov at the National Cancer Institute. This page documents how to compile and install Osra on Ubuntu Linux 11.10. These instructions may work on other versions of Ubuntu Linux and on Debian Linux.  Please leave a comment if you have compiled Osra using these instructions on a different version of Ubuntu, or on other Linux distributions.

Overview

At the time of writing this doc, March 2012, the Osra version is 1.3.8 and is available at:

I copied all the source to a directory in /tmp. If you need the source code at some later point in time, don’t use /tmp as files in /tmp are deleted upon reboot (if they’re older than 14 days). Also, at the time of writing Osra requires a patched version of Gocr for Osra to work. You need to install Gocr before you try to compile and install Osra, you also need to install other packages required for Osra to compile. Most are listed below, but see the Osra Homepage for more details.

An overview of the steps are:

  1. Install required Ubuntu packages
  2. Compile and Install Gocr
  3. Compile and Install Osra

I’ve also written instructions on how to install Osra 1.2.1 on Ubuntu 9.04, however that was written in 2009. Continue reading Build & Install Osra 1.3.8 on Ubuntu 11.10

Cogs games on Linux not working?

See this forum posting for a potential fix, if your using an ATI graphics card:

http://forum.lazy8studios.com/index.php?PHPSESSID=h1d37r13a2d2ccnk5c5j6b2c94&topic=475.msg837#msg837

This is a fix for the bug where Cogs launches with the following output:

Shader compile log for data/effects/TextureBumpCubemap.fsh:
Fragment shader failed to compile with the following errors:
ERROR: 0:41: error(#132) Syntax error: ‘smooth’ parse error
ERROR: error(#273) 1 compilation errors.  No code generated

Apparently the word “smooth” is reserved, but only on ATI cards in Linux.  The fix is to modify the following file.

~/games/cogs/data/effects/TextureBumpCubemap.fsh

Just do a global replace of the word “smooth” with “Smooth”.

A huge thanks to Renee Marie Jones, who figured this one out :)

I wasn’t seeing that particular output on the console, and the screen was just blank/black and I could hear the music. But, this fix did work for me on Ubuntu Linux 10.10 (Maverick).

Linux, Python, Boston, Donegal.