IT Tips

Access

Blog History

PHP FileInfo

Trying to get PHP to return the file type of an xcf image and it stubbornly refused to return what I wanted. Still can't get it to output image/x-xcf but I'm starting to think the compiled in magic data base of PHP doesn't include it and I haven't successfully loaded...

read more

How to Troubleshoot Cron Scripts

It works from the command line. Why doesn't it work in Cron? ...insert head scratching here... Firstly run your cron job often so you can get some output. Use common sense here, obviously if the cron scripts takes 5 minutes to run then you would bump up the frequency...

read more

Taking Screenshots of a Website in Linux

They said "James we need someone to check a website and make sure everything is OK over the weekend". Hmm OK... I'd rather not be tied to a laptop or hang around home so why not send an email with a screenshot to my Android HTC Desire. Search, search, search: And then...

read more

awk specifying multiple field separators

I want to extract the text "Windows 2008" sandwiched between [VM STORE] and "/Windows 2008.vmx" So I need two field separators ] for the left and / for the right. So for awk I use "[]/]" as the argument to -F. Then I need to trim the spaces using sed. echo "32 EDI...

read more