Recursively Deleting all SVN folders

Posted by Stuart Forster on 20th April 2012
Tagged: linux, svn

Here's a quick code snippet for how to recursively delete all SVN folders.

Read more... [Post Comment]

Linux: Copying from one folder to another without overwriting any existing files

Posted by Stuart Forster on 13th March 2012
Tagged: copy, cp, gnu-cp, gnu, linux

Here are a few tricks on how to copy files in linux from one location to another whilst not overwriting any files.

Using GNU Copy (which is not included in all distributions) you can simple use the -n (--no-clobber) option like follows:

cp -n /source /target

But, if you happen not to be using GNU copy, a nice little trick I found is to do the following:

yes n | cp -i /source /target

As you can see - I'm simply piping an n into the cp command to tell it not to overwrite any files.

Another option is to use RSYNC, example as follows:

rsync -r -ignore-existing /source/. /target/.

Read more... [Post Comment]

Quick and easy comparison for apps or anything

Posted by Mike Caisey on 16th November 2011

If you need a quick comparison of almost anything you can just type the name of it into Google and it with "vs".

Blog vs google image

This will make google fill the rest of the sentence which will be full of alternatives for the thing you're searching for.

 

I use it with linux commands like sed and awk and another side effect is that it quickly defines the thing you're searching for.

Read more... [Post Comment]

Howto: Stop Postfix from HELOING as localhost.localdomain

Posted by Stuart Forster on 4th November 2011

Recently, one of our newly setup mail servers was being added to Spamhaus XBL blacklist because it was HELOING as localhost.localdomain. This would prevent emails from reaching alot of addresses if not fixed (We found this issue during site testing!)

The quickest way to address this (since our /etc/hosts file was correct) was to edit the main.cf postfix configuration file.

You can find the file at /etc/postfix/main.cf.

Open up this file, find the line that says myhostname and change to what you want it heloing as. Now all you need to do is request removal from the blacklist (should take no more than 15/20 minutes).

You're done!

Read more... [Post Comment]

How to: Set up and rotate automated MySQL and File/Folder backups

Posted by Stuart Forster on 19th August 2011
Tagged: backups, mysql, how to

In this blog post I will try to give you a quick tutorial on one way you can automate and rotate mysql and file/folder backups.

Read more... [Post Comment]

Test file uploads in PHPUnit using curl

Posted by Mike Caisey on 8th June 2011
Tagged: TDD, mike, phpunit, tests
Use curl to POST a file and other form data to your application through the test environment's apache host. You can do this in the setUp for each test.

Read more... [Post Comment]

Slow Apache in a Virtual Machine with Shared Folders

Posted by Stuart Forster on 25th May 2011

If, like me, you run a unix based LAMP server inside a virtual machine (VirtualBox, VMware...) then you might have noticed apache will not update or send updated static files to the browser if they're served from a vboxsf or hgfs mounted filesystem share.

Read more... [1 Comment(s)]

Using Selenium test tool in our site tests

Posted by Mike Caisey on 4th March 2011
Tagged: TDD, testing

I've recently incorporated the Selenium Java based test tool into our testing suite for some of our projects. “Selenium Remote Control allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.” Taken from http://seleniumhq.org

Read more... [Post Comment]

PHP South West meet in the Golden Guinea

Posted by Mike Caisey on 10th February 2011
Tagged: Bristol
Last night we attended the PHP South West meet in the Golden Guinea, Redcliffe, Bristol.

Read more... [Post Comment]

Mind Relaxation with a Silent Alarm

Posted by Mike Caisey on 7th January 2011
A tool for giving your mind a rest to keep mental fatigue at bay. Whilst not annoying everyone else in the office.

Read more... [Post Comment]

< Previous 1 2