kieranbarnes Independent PHP, WordPress & CubeCart Programmer

Preventing MSN Messenger Spam in Pidgin

Posted on May 13, 2009

Posted by Kieran

I use Pidgin as my instant messenger application. Mainly because it allows me to chat to clients and sub-contractors across Yahoo, Google, MSN etc all in one application, with the added bonus of not being full of spam and adverts to hurt my eyes.

Using SCP to copy files between Linux servers

Posted on April 4, 2009

Posted by Kieran

even a gnome shell can look goodSCP? SCP is a method of securely transferring files between a local and a remote host or between two remote hosts, using the Secure Shell (SSH) protocol.

Sounds confusing?

Tagged as: , Continue reading

Permanently mount a Windows share in Linux

Posted on April 4, 2009

Posted by Kieran

A Terrabyte?Sick of manually mounting a Windows share on Linux with "mount" for it to drop off randomly? Or not really knowing if it is mounted or not?

Then make a permanent mount in fstab.

Tagged as: Continue reading

SQLyog Query Profiler

Posted on February 10, 2009

Posted by Kieran

MySQL has always lacked the sophisticated profiling tools shipped with proprietary databases like SQL Server, etc. MySQL developers have largely depended on EXPLAIN for tuning queries. The SHOW PROFILE patch by Jeremy Cole was introduced in the MySQL Community version 5.0.37 and it provided much more insight into where the query spends its time. However, to take advantage of this feature, MySQL developers were supposed to switch on profiling, run their queries and then filter the profiling data from a table that contained the profiling results of the last few profiled queries. A lot of manual book-keeping is required to take advantage of this powerful feature. In an ideal situation, the MySQL developer should execute the queries and the profiling info should be available along with the result-set. Unfortunately, none of the MySQL client tools (desktop or web-based) provide intrinsic support for this feature.

Watch the Screencast on Query Profiler.

I♥MySQL

This is not a door

Posted on January 16, 2009

Posted by Kieran

img_2185-medium

Filed under: Photography No Comments

Run DMC Crossing

Posted on January 13, 2009

Posted by Kieran

img_0029-medium

Filed under: Photography No Comments

Moist Honda

Posted on December 18, 2008

Posted by Kieran

hh2

Filed under: Photography No Comments

Block Countries in Apache

Posted on November 18, 2008

Posted by Kieran

Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines of code.

I had a client who was experiencing an inhumane amount of spam on their phpBB forums, which are notorious for bot attacks. Luckily this forum was geographically specific - so we can block all the countries we aren't interested in.

Convert phpBB IP Addresses

Posted on October 9, 2008

Posted by Kieran

phpBB stores its IP addresses in a funky format. They're useless to the human eye!

Convert them to normal IPs with the following code

SELECT CONCAT( CONV( substring( poster_ip, 1, 2 ) , 16, 10 ) , '.', CONV( substring( poster_ip, 3, 2 ) , 16, 10 ) , '.', CONV( substring( poster_ip, 5, 2 ) , 16, 10 ) , '.', CONV( substring( poster_ip, 7, 2 ) , 16, 10 ) ) AS IP
FROM phpbb_posts
WHERE `poster_id` = USERID
LIMIT 0 , 30 

This code will convert all know IPs from a selected user (In my case 51).

Tagged as: , 7 Comments

Using WordPress header and footers externally

Posted on September 24, 2008

Posted by Kieran

I needed to integrate a WordPress header (header.php) and footer (footer.php) into an external application.

There are quite a few ways round this, but none are really ideal. For example, if you want to include an external page in WordPress for whatever reason, you could use the Exec-PHP plugin. Simple, hey? No.

Page 22 of 35« First...10...2021222324...30...Last »