A fantasic night with Petsintime

I joined Petsintime for the day at the Pedigree Wholesale show and what a fantastic bunch of people!

The show was filled with fresh ideas and products available to retailers who are thriving despite the economic climate we find ourselves in.

Its great to see new innovations from Tropical Marine Centre such as the AquaGrow Micro Habitat and products for a happier, healthier dog such as the K9 Natural range of raw dog food which takes feeding your dog back to basics and as close to nature as you can get.

These and other examples show us how an already competitive industry can innovate and create new niches which thrive even in our tighter economic times.

Mike Duma Meets Pop Icon @KylieMinogue at StudyVox

Today was a big day, I had the pleasure of meeting a true idol not just of the pop world but for me personally.

Kylie Minogue & Mike Duma

Kylie Minogue, pop icon, patron of the StudyVox Foundation and a constant presence in my life since my formative years awarded bursary cheques to a few lucky members of www.studyvox.co.uk, a student social networking site I have been developing with Quvex over the past few months.

I can still clearly recall watching Kylie Minogue on my favorite school boy tv show Neighbours in the 80’s and then later buying her Locomotion single on cassette tape. It was the first song I actually took the time to write down all the lyrics for, before the days of the Internet, and, although at this time I was about 11 years old, I even remember using my trusty old Fisher Price portable cassette player to play and pause the song while I jotted down the lyrics driving my parents insane!

I’m not going to go as far as admitting to purchasing the Kylie Minogue and Jason Donovan love compilation album because that would just be embarrassing! Suffice to say I was a fan.

When Kylie Minogue resurfaced after reinventing herself I must say I began by being somewhat resistant to the new style purely because I still had the Locomotion ringing around in my head. Luckily my reservations were unfounded and the Kylie Minogue we have all come to love, or fall in love with all over again, was reborn.

So there I was today meeting a true idol who is patron of the charitable foundation for a website I have been developing. The same person I grew up watching on the tv every day and listening to her music. To say there was a bit of a head rush just before the first handshake would be an understatement!

Kylie was amazing at putting you instantly at ease, charming, charismatic, genuine and a real joy to be around. It was awesome to discover that Kylie also reads her tweets and recalled one I sent the night before. As a world wide superstar this was great to hear.

Kylie Minogue commented that Twitter provided her with the only real opportunity to communicate with her fans without the press twisting, changing or completely making up the story. This shows us that Twitter isn’t just for updating your friends, marketing or delivering a concise message to your fans after being vetted by your PR team, or written by them, celebs are actually utilising Twitter to communicate their real world thoughts and keep in touch with what is being said about them in the real world. Makes a lot of sense and gives me the impression of being that little bit more involved with the person behind the star.

Of course Kylie is bound to be master at controlling the perception of herself from years spent in the media but after meeting her in the flesh I choose to believe that it is all as genuine as it seems.

A fantastic time at StudyVox was had by all with the day finishing off with a performance from the winners of the best student band award. They really did rock, especially with Kylie jumping around in the audience!

Optimising your Websites Performance with mod_deflate

Websites are getting more and more complicated and contain multiple CSS and JavaScript files as well as multiple images, even the simpler ones.

If you are using a content management system like Wordpress, Joomla and Drupal or an ecommerce solution such as Magento, Actinic and CubeCart then you will certainly have multiple web files with CSS and JavaScript to deliver your dynamic and functionl web pages.

So to ensure your site is nice and fast for your users theres a real quick and easy way to implement a bit of compression on all those files with mod_deflate. Ill look at other methods such as mod_gzip and compression without these modules installed in a future article.

If your server supports this (check with a php info file or ask your host) then you can add some compression in the .htaccess file. You will probably want to double check the browser that is accessing the webpage supports compression also, about 90% of them do, so well add that to the .htaccess too.

The following needs to go in your .htaccess file and will enable mod_deflate on your files.

# place filter DEFLATE on all outgoing content
SetOutputFilter DEFLATE
# do some browser checking for compression support
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# exclude content we cant compress
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rpm|ico|iso|gz|bz2)$ no-gzip dont-vary
# properly handle file behind proxys
Header append Vary User-Agent env=!dont-vary

Thats it you are now compressing files for speedy delivery of your content!

Ill be adding other methods for speeding up your websites and conforming with yahoos YSlow checks later but this on its own should be a big help.

iPhone – The Bloggers Digital Notepad

As a fan of the true portability of mobile technology and my new found passion for blogging I needed a way to jot down my thoughts whilst not sat at the laptop.

I am writing this post with the Wordpress iPhone app and am very impressed with its ease of use and functionality.

I find myself asking the question Can the iPhone replace the paper notebook?

I have been pushing the boundries with my technology for many years now and as a person afflicted with bad handwriting have always sought a digital alternative to the paper notepad.

I first began using a digital method to capture notes on the HP TC1100 Tablet Computer in 2002 which came loaded with Windows XP Tablet. It was great for taking handwritten digital notes and did a pretty good job of translating my terrible handwriting. The notes were also searchable which made them much more useful than standard notebook notes.

Unfortunately 8 years on and no one has produced a better Tablet Computer, although its set to change this year with Apples iPad and other Tablet devices coming out later.

I therefore find myself constantly turning to my trusty iPhone for all manor of applications, one being digital note taking.

The power that an iPhone can put in your pocket is made possible by the huge community of iPhone app developers and the App Store.

When I searched the App Store for Wordpress I was greeted with the official, open source app, awesome!

Installed, up and running and blogging on the iPhone.

Whilst not as fast as the laptop the ability to whip out your phone and write a quick blog entry is hugely useful. You dont need to be online so you can write on the train without the fear of losing the connection and just save to drafts locally.

The app did bomb me out whilst adding new categories and switching back to the blog body and I was poised to bin it. However when I loaded my blog back up I was kindly informed that I had an unsaved blog and it had been recovered. Wordpress have a history of not leaving you in the lurch with unsaved work and the iPhone app is no exception.

Adding tags and assigning to categories is a breeze, Ill need to log in to the main admin panel to check spelling and search engine optimisation, but this app and I could become new best friends!

For me its about convenience, ease of use, portability and a better way of getting my thoughts down on the move than with my appauling handwriting. You know what; the iPhone and Wordpress app come pretty close to ticking all the boxes, I cant wait to see how the iPad improves on this.

A quick and easy guide to SSH & useful Linux commands for those who want to try but don’t know where to start!

For those of us who aren’t geeks and who don’t know the syntax for changing the owner of a file/folder in Linux but who want to make use of the power of the command line, this is for you.  It’s also for me so I have a reference point for all those commands I use and then forget…

This is not meant to be a complete guide on SSH clients, the setup and use of them or a comprehensive guide on all available switches (the things that you add to the commands to make them do things in a certain way) and I advise caution when messing with your server via SSH, especially when logged in as root!  You may want to try this on a non production environment if you are completely new to SSH, you have been warned!

So first off SSH (Secure SHell) is a great way to access your web server securely and perform tasks quickly, some of which are impossible without SSH and others that you just wouldn’t want to do any other way (especially once you have experienced the power of SSH for yourselves!).

You’ll need to get yourselves a SSH client if you don’t already have one, the simplest and the best is PuTTY and it’s free.

Other prerequisites are; a user account that has permission to access the server via SSH and the root username and password, ask your host provider if you’re not sure and bear in mind that shared servers will probably not let you have SSH and certainly not root access (you can mess with everyone’s sites then).

You save the IP address to your server in the PuTTY client, give it a name so you can just double click it next time and then you will be presented with the no frills black and white console.

Logging in

Start off by entering your username and password, you won’t see your password as you type, it’s just blank but it is working.

Right you’re in! lets have a look around with some simple commands:

  • ls will list all files in the directory, depending on where you are, you may not see anything with this without typing:
  • ls -al (the -al is a switch, ‘a’ means all files including hidden and ‘l’ means long form (basically show me a list of everything with all the details)

You may not see any directories here and if you want to get into your website(s) files you’ll have to go through the root path which on most servers begins with /var. So lets get into /var:

  • cd /var (note that cd var without the / will not work, the / takes you to root and then to var)
  • ls -al

Now you can see some files and directories that you may start to recognise, type ls if you want to see less detail.

A useful tip: start typing part of a file name or directory name and then hit the TAB key on your keyboard, it will fill in the rest of the name automatically, particularly useful for long directory names and file names. (eg cd my[TAB] will fill in cd mysite)

From here you will then want to go into www or home depending on your configuration, again if you don’t know the root path to your website(s) ask your host or upload a phpinfo.php file to one of your sites and browse to it to see a host of useful info.

  • cd www or cd home (note no / putting /www or /home will attempt to take you to that folder in the root not the sub folder of where you are)
  • ls will show you where you are

Now you will have a directory vhosts or you will be straight into your websites(s) directory(s) or somewhere else depending on your configuration.

You’re looking for the directories named after your website(s) like mysite, someonessite, etc.

  • cd vhosts
  • cd mysite OR (don’t type the OR)
  • cd mysite
  • ls

Now you should see the directories that you would expect if you logged in to ftp for the site like public_html or httpdocs.

  • cd httpdocs OR (don’t type the OR)
  • cd public_html
  • ls

OK now you’re looking at the files in your web directory.

So that’s all well and good but what can we actually do now that’s useful?

Well one thing is you can pull down install files for applications such as Wordpress.  If you have ever installed Wordpress by downloading the install zip file, unzipped it and then ftp’d it up you will know how long it takes ftp to upload ALL the files and if you loose connection part way through you have to start again and could end up with a corrupt install.  This is also true for other web applications such as Magento.

However if you are not in the home directory of the SSH login account then you will get restriction errors with the next commands so the easiest way to perform the next tasks is to type:

  • su -

This command switches user to the root account and can also be used to switch back to your account for eg:

  • su mduma

Switching to the root user will require the root user’s password.

Be careful as you are now in as root and you could delete the whole server if you type the correct command and you will not be warned by the server, you are presumed to know what you are doing logged in as root.

Now you can start to see the benefits of SSH and the command line.  We’re going to grab the compressed install file directly from Wordpress, just replace the url in the next command for any other web app you might want to be installing or any file you want to download to your server (note we are getting the .tar.gz file, that’s the one you want for a Linux server):

  • wget http://wordpress.org/latest.tar.gz

(Useful tip: you cannot use ctrl+v to paste into PuTTY but if you copy the command you need and then right click into PuTTY it will paste it in)

Now extract all the contents to the current directory

  • tar xvzf latest.tar.gz

Nice and fast!

Setup your database and then start the web install, easy!  A couple of seconds compared with much more time downloading, extracting and ftp’ing.

Another really useful function is backing up your web directories by compressing them first and then just downloading the compressed files for a local copy or just leaving the compressed file on the server for future un packing should you need to restore back to a pre existing state, say if you were doing a lot of work directly on the directory of a site.  We will use tar again (Tape ARchive, from the days of tape backups).

  • tar cvzf mytar.tgz mydirectory

Now you may want to move this file somewhere else or move all the contents from one directory to another:

  • mv -f mytar.tgz ../

The ../ moves the file to the directory above where you currently are, useful.

I also find the tar’ing really useful when downloading a web application install directory to run on your local wamp setup, rather than downloading all the thousands of files, which can take hours, again you just tar up the whole directory and download one tar file, great!

Ok so we are starting to do some work on the server now via SSH and quite a bit using the root account.  You need to be aware that the owner of the files you are moving and extracting will be the root account and not the actual account owner or the ftp account owner.  This will cause you some issues when trying to move, update and delete files back in your ftp client because you will not have permission to perform those tasks.

Not to worry another useful command we can use will change the owner of the directory and/or files.  This can also be useful if your web application downloads and installs files to your server and you then can’t work out why you don’t have permission to do anything with those files, the owner will be a different account on the server in some cases, this happened recently on one of the Magento installs I did.  Luckily I knew this handy command:

  • chown -R myftpuser:myftpuser public_html

So what we are doing here is chown’ing (changing the owner) recursively (note the capital R) (recursively just means all files and folders within the directory) to myftpuser and the group myftpuser of the public_html folder.  You could just change the user and not the group:

  • chown -R myftpuser public_html

If you aren’t sure of the user it’s a good chance it will be the ftp user name and if you’re still not sure then you should be able to see the owner in your ftp client.

Breathe….

Another useful command is similar to the above and its used to change permissions for files and folders, its much faster than doing it in your ftp client if you are recursively changing lots of files and folders:

  • chmod -R 0777 public_html

Now you should know about file permissions and if you do you will probably know that you shouldn’t enable the above permissions recursively (or not) on the web root directory!  But you get the idea…

I find this particularly useful on a Magento installation when you want to use the Magento Connect facility that requires write permission on you Magento install directory to work.  You can then go back in and re set the permissions in another quick command like:

  • chmod -R 0755 public_html

Or even more restricted:

  • chmod -R 0644 public_html

I’m going to leave you with a really handy tool that should be installed on your server, if not go here and look for how to install the rpm binary for your server.  It’s Midnight Commander!

  • mc

Yes, that’s it!  Two little letters and so much joy :)   For those of us who prefer a little GUI with our SSH this is the perfect tool for browsing around your server, it has a text editor built in and it can do pretty much all of the simple commands above.  I don’t know about you but I can’t be doing with learning, and remembering,  commands for saving, editing and quitting out of a text editor, give me a bit of point and click every time!

Apple iPad and iBooks Store – Set to take over the digital book world?

OK so we all love cool gadgets, I certainly do, and possibly one of the coolest gadgets due to hit the shops in the US at the end of March is the long awaited iPad from Apple.

Much anticipation preceded the launch on Wednesday as consumers world wide waited to see if Apple were set to reinvent the market.

Of particular interest was the iBooks store which could see Apple corner the market in digital book distribution much like it did with its iTunes store for music. We have learned from the iTunes experience, if you give consumers an ultra easy method for getting the content they want onto the device they use every day then you can take over that market.  Price becomes less of an issue, and we even forgave the DRM on our music for a while too.

I was an avid Napster user, subscribing to their £10 per month service.  I had the Windows Media Centre version rigged up to my TV for unlimited streaming of music to my front room.  I wanted my music on a portable player and took the decision to go away from Windows based devices and opted for an iPod, I had arrived at the Apple music revolution!

The problem with this was that I could not get Napster music on to the iPod because it was DRM so I needed a separate Windows DRM supported device, my second portable player arrived shortly after this discovery.

So now I had Napster on my PC, TV and my portable player, great but a nightmare to sync up, often taking hours to download and sync enough music for a weekend away with many failed attempts.  This is when I dusted off the iPod, ditched Napster’s £10 per month unlimited music service and never looked back, well until Spotify arrived a few years later but that’s another story!

The point I’m making here is that I had a great setup, it was cheap and it was legal but it just was not that easy to get my music out and about with me.  This is where Apple was able to corner the digital music distribution market by making it easy to get your music where you wanted it.  Putting the iTunes store on the iPhone and iPod Touch was another genius move and just keeps making it easier and easier to buy music from Apple.

This is what is promised with their iBooks store and the iPad.  The iPad isn’t digital ink and they will not be launching with as many titles as you can get at Amazon but if you want a real easy method of getting your book onto a digital device that you want to have with you all the time then the iPad is surely going to set the standard.  More titles will follow and the digital reader industry will wonder what hit them.

My guess is that if consumers are going to purchase a third device for their digital reading they are going to opt for a super sexy, full colour, multi functional device that could replace their netbook or ultra portable laptop, not a monochrome e-reader with limited functionality, and we’ll forgive the digital ink – for now.