Archive for the ‘Geekery’ Category.

I’m in love with a Yellow Drum Machine

I love the Yellow Drum Machine.

I love it’s mission in life…. seek out friends and play with them objects and bang on them with a joyous noise.

robot

Firefox 3 is super snazzy

Groovy. Firefox 3 is really nice. Pages load faster and the new features I’ve found so far have all been non-intrusive and all quite welcome. :-)

Mediawiki, WordPress and PHP Performance Improvements on Lee.org

I run several Mediawiki wikis and WordPress blogs on my Dreamhost shared hosting. I continue to work on improving performance on my wikis.

Here are some performance hints for the Mediawiki LocalSettings.php file I am running right now:

## Compress output if the browser supports it
# I commented this out in favor of wgUseGzip below. I -think- it offers better
# performance. LCS 5-6-08
# if( !ini_get( ‘zlib.output_compression’ ) ) @ob_start( ‘ob_gzhandler’ );

# Enable the basic file cache for static pages for non-logged-in visitors
$wgUseFileCache = true;
$wgFileCacheDirectory = “/home/.author/leedh/lee.org/[my temp folder]”;
$wgShowIPinHeader = false;

# I set wgUseGzip to be true and commented out the bit about ob_gzhandler
# above. I -think- this makes for better performance. LCS 5-6-08
$wgUseGzip = true;

$wgEnableSidebarCache = true;

#default is 1, changing to a higher number will be a little bit
# nicer to the database
$wgHitcounterUpdateFreq = 10;

$wgUseETag = true;

I also run my own PHP executable on Dreamhost and PHP_Fast_CGI. I didn’t take the time to install my own PHP. This is a bit of a hack but it works fine. I control the php.ini file… read below. The part I like the most is that I don’t have to manually upgrade PHP every so-often. Dreamhost will do it automagically. Here is an excurpt from the .htaccess file of the root of my website that tells all the PHP programs on my site to use my PHP and PHP_Fast_CGI.

# This is to run my own PHP and PHP_Fast_CGI. Since this is in the root
# of my web site, the whole website will run this way.
# note that I modified php5-wrapper.fcgi to run my own copy of PHP
AddHandler fastcgi-script fcg fcgi fpl
AddHandler php5-fastcgi .php
Action php5-fastcgi /php5-wrapper.fcgi

The contents of the php5-wrapper.fcgi file in the root of my account is:

#!/bin/sh

# Run PHP with 2 persistant processes
export PHP_FCGI_CHILDREN=2

# Run PHP
#exec /usr/local/dh/cgi-system/php5.cgi

# Run my own PHP with increased limits
exec /home/.author/leedh/lee.org/cgi-bin/php.cgi

The php.cgi file in the cgi-bin directory is the PHP executable fetched from where it normally lives on the Dreamhost server at /dh/cgi-system/php5.cgi. Once a month I run this script to make sure I have the latest PHP. This script also fetches the php.ini and modifies it so I can upload files using PHP up to 100 MB instead of the 7 MB limit.

#!/bin/sh

# This script copies over the latest php5 to my folder so I can run PHP locally.
# running locally lets me use my own php.ini (in the same directory as php.cgi)
# So then I can set the max post size and max filesize to larger than 7 megabyte
s!!
# Hurray!

CGIFILE=”$HOME/lee.org/cgi-bin/php.cgi”
INIFILE=”$HOME/lee.org/cgi-bin/php.ini”
rsync -a /dh/cgi-system/php5.cgi “$CGIFILE”
# REMOVE THE FOLLOWING LINE TO CREATE THE UPDATE-ONLY SCRIPT:
cp /etc/php5/cgi/php.ini “$INIFILE”

perl -p -i -e ‘
s/.*post_max_size.*/post_max_size = 100M/;
s/.*upload_max_filesize.*/upload_max_filesize = 100M/;
‘ “$INIFILE”

Enjoy.

reason-villege-old-spring-green-right-justified.jpg

Internet Explorer viewers of this blog can now see what Firefox viewers have been enjoying for the last year or so…

miki-burning-man-04.jpgThe green bar behind “Lee.org” at the top of the blog wasn’t visible in IE til I fixed a .css file. Actually, the issue was that IE didn’t follow CSS specs, but it’s hardly worth griping about. IE 6 doesn’t see the background image in my CSS file when it reads as such:

background-image: /* url("http://lee.org/blog/images/reason-villege-old-spring-green.jpg");*/
url("http://lee.org/blog/images/reason-villege-old-spring-green-right-justified.jpg");

burning-man-2004-2-155.jpgI suppose it’s because IE sees the text being on 2 lines (there’s a carriage return in there)   as being 2 elements. But I’m not going to spend any more energy figuring it out.

The writing actually phonetically spells my name in Japanese. Logically, it’s an odd collection of thoughts… “Lee” sounds like “Reason”. Then “Son” and “ko” sound like “village” and “old”.

I have to thank Miki Kawabe for the translation. At Burning Man in 2004, we won the Second Annual Semi-authentic Finnish Wife Carrying Event. We won her weight in beer.

Yes, really!

RegSeeker

Hey will ya look at that. Regseeker actually made my computer a little faster. I had it remove a few thousand unused registry entries and my Windows XP computer got a little faster. I was a bit worried that it would do Very Bad Things to my registry. I made backups and stuff. It’s been a week and so far, no earth-shattering “kaboom” like that accident with the space modulator.

It’s freeware available in many places, including locally.

How to Download Images from Flickr

I don’t like Flickr because all the photos are … over there. They aren’t on people’s servers that can be backed up to personal archives. In time, all links to all content break.

Here’s a good way to save Flickr images back on your own computer. I tried Downloadr but it kept crashing on me.

flickrdown

And here is a local copy of the same (of course)

PHProxy – a Good Proxy Server

The PHProxy web proxy works with Dreamhost :-) . Get it here. The author isn’t supporting it any more so here’s a copy of the latest version of PHProxy AKA Poxy taken from Sourceforge on 9-9-07. You’ll want to put it behind a password because Dreamhost doesn’t technically allow open proxy servers (just imagine the huge server and bandwidth load on your $7/month account).

Here’s a good guide to anonymous proxy servers. I found it here.

How to stop mediawiki spam

We started getting spam on a Mediawiki based project I belong to, SWARM. I installed the ConfirmEdit extension and haven’t had another spam yet.

  • Wiki first launched March 2007.
  • First spam May 2007.
  • Last Spam… that same day. :-)

Update 4-4-08: eventually, I started getting spam through this. So I had to lock down the wiki. I disabled registration and made it so only logged-in users can edit. No more problems.

Dear Lazyweb: Automatic emailing of Recent Changes in Mediawiki

When working with a group on a small but active wiki, it’s easy to forget to look at the Recent Changes list for timely updates. I would like an extension that sends a daily email with a digest of what changes have taken place on the wiki in the past day. By showing all recent changes in an email, users can’t accidentally miss out of developments on new pages. Additionally, people are reminded of the wiki’s existence so it doesn’t suffer bit-rot.

There are several ways the the email recipient group could be defined.

There is a hint of this behavior at Watchlist subscriptions and the PovWatch extension but the idea isn’t developed.

The MailNotification extension has the right idea but it doesn’t work.

My Blog is slow/broken

Yeah, I know. Sometimes it runs really really slow, sometimes looks funny and sometimes its der broken. I’m working on fixing it with help from Dreamhost’s techs.

Again and again and again…. grrrrr.