Ians Ramblings Ian's ramblings, daily, ish

18Jun/100

Remove svn folders from a directory

If you decide you want to remove the subversion control hidden folders from a directory, you can run the following: -

find . -type f -name "*.svn" -exec rm ‘{}’ \; -print
Filed under: Technical No Comments
18Jun/100

How to copy symbolic links

Sometimes you just want to copy one or more symbolic links into a new directory in Linux, the command is simple but there seem to be lots of forums with some crazy posts on the sibject, so I thought I would just put the command in a blog post: -

cp -P /dir/symlink /dir/

Main thing is just to leave the trailing slash of the symlink as it's obviously not a directory.

10Jun/100

Google’s Rubbish new home page

Picky but, doesn't Google's home page look like crap? It is a huge ugly pixelated image, in order to change it you need to login which means needing a dirty google account yuck.

I am going to be using bing, I wonder how many people will do the same today, why not have a try an alternative search engine week..

Filed under: Technical No Comments
26May/100

Ian’s Ramblings Mobile

I thought I would try out something I got shown today at work, see how it works for my little site.

OK so if you have a barcode scanner on your phone, for example on my Nokia it's inside the tools folder, you can start it up and scan the following image. This should then allow you to subscribe to my RSS feed, basically read my postings on the move!

There's more info on these QR codes at: -

http://code.google.com/apis/chart/docs/gallery/qr_codes.html

Filed under: Technical No Comments
17May/101

Images Search

I found a rather nice site for searching for images, of all kinds, over 8 million of them, news sport and entertainment. Hehe ok so it may have been made by me, but thought I would include it on the blog incase anyone fancied a gander.

It uses sphinx and replicated MySQL and a range of caching techniques, hopefully it makes it quite nippy.

Users can also subscribe to RSS feeds of either their own searches or via the preset latest categories.

Press Association Images

Press Association Images

The RSS feeds can be accessed at the following URLS: -

world cup pics

latest news pics

latest sport pics

latest entertainment pics

Filed under: Technical 1 Comment
1Apr/100

Screen burn-in / Image retention removal LCD TV

I made the silly mistake of leaving my DVD player on the menu of Easy Rider the other day, and ended up with Peter Fonda's face burnt in on my LCD TV, which was as you can imagine more than a bit of a panic.

After reading around rapidly, and coming across jscreenfix I started to follow the instructions leaving it over night attached to a laptop hoping it would clear itself, I can tell you it does nothing.

All you need to do to resolve image retention / screen burn in on your LCD TV is to turn it off at the wall, allow the liquid crystals to return to their dormant state, say within a few hours then turn it back on and you will find it is back to normal!

Jscreenfix and other such tools, DVDs etc I am sure must just be for plasma TVs or stuck pixels, even though it says it removes light burn-in from LCD TVs.

30Mar/100

Memcached PHP

Installing memcached for php on CentOS is as easy as: -


yum install memcached

yum install php-pecl-memcache

service httpd graceful

Once installed you can start the memcached service as either a standalone service or as a daemon.

Run as any user other than root, starts as a normal process using up to 1 gig of RAM.


memcached -m1024

Or as a daemon


memcached -d -m1024

You can always get more info about memcached's options with


man memcached

PHP memcache documentation http://php.net/manual/en/book.memcache.php

Memcached's site http://memcached.org/

16Mar/100

Apache ReWrite proxy and spaces

Passing the spaces in a URL through to another URL using a proxy style re-write in Apache can be a slight pain because as standard it basically cuts off the URL at the first space.

The answer is rather easy once you know how: -

RewriteEngine ON
RewriteMap escape int:escape
RewriteRule ^/search/([^/]+)/?$       http://%{HTTP_HOST}/index.php?action=search&search_txt=${escape:$1} [P]

In this example index.php should then receive whatever is after /search/ on the url until the next optional /

9Mar/100

Gzip Compress Apache’s Output

This has been described many times and in many ways by so many sites, but usually the descriptions are long and tedious. If you simply want to know how to get your website's pages to be compressed if the browser supports it, or not if the browser doesn't add the following lines to your Apache configuration file: -

SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

Basically compress anything that can be compressed using the gzip algorithm ignore images because they are already compressed.

I put these directives within my Virtualhost but they could be just used in an .htaccess file I believe.

To test it is working, install the firefox web developers plugin, open your page, click the information drop down and select the option to view the page headers you should see something like: -

Date: Tue, 09 Mar 2010 10:42:56 GMT
Server: Apache/2.2.x (SGI)
X-Powered-By: PHP/5.1.xx
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Tue, 09 Mar 2010 10:42:57 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip   ----- This being the item of interest
Content-Length: 12115
Content-Type: text/html; charset=UTF-8
X-Cache: MISS from conway
Connection: keep-alive
200 OK
27Feb/100

Permalinks without .htaccess

If you want to use Permalinks on wordpress blogs but want to use the Apache recommended method of virtual hosts and directory directives rather than .htaccess files the following may help.

Go to settings and permalinks change to the style you want click save, then open the .htaccess file copy it's contents, then edit your virtual host settings in your apache config file adding the directory of your blog and paste the contents of the htaccess file between the directory tags.

This is mainly useful if you are running a range of different sites on the one server and may want different permalink styles in each and perhaps within each directory.

6 visitors online now
6 guests, 0 members
Max visitors today: 6 at 01:12 am UTC
This month: 6 at 08-01-2010 01:12 am UTC
This year: 48 at 06-10-2010 05:19 am UTC
All time: 48 at 06-10-2010 05:19 am UTC