How to rsync directory structure but not files

rsync -av –include=’*/’ –exclude=’*’ /src/path /destination/path An example where we use it is when building Magento templates and themes, we copy the directory structure across but not the files so that when we need to, we can copy a file across from the base theme without having to create the directory structure before copying the …

Bash: Bulk Convert M4V to Good Quality FLV using ffmpeg

High Quality – File size ends up being larger than the M4V for i in *.m4v;do ffmpeg -i $i -ar 22050 -qscale .1 ${i%.*}.flv;done Quality is almost indiscernible from the original M4V in a laptop for i in *.m4v;do ffmpeg -i $i -ar 22050 -ab 96k -qscale 2 ${i%.*}.flv;done Slight degradation in quality. File size …

How to install Git on Cpanel based 64bit Centos servers

Quite easy really, once you know how. First we add in the Epel repo for 64bit Centos5 rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm and then you need to disableexcludes in yum due to Cpanel disabling Perl from yum updates. So to install git now, we run. yum –disableexcludes=main install git Simple, really.

Using mod_rewrite for moving websites, folder and domain names for SEO retention

mod_rewrite is a powerful Apache module that gives you the power over the URL’s displayed to your visitors to your site. Much has been written already by many people using both examples and tutorials of the basics. The aim of my addition, as always is primarily for my own notes and secondarily to explain why …

How to type a degree symbol in Linux

Today, I came across a document where I had to type a degree symbol in Linux. Thanks to this post at Arch Linux Forums, it was painless to find out how. So here it is: In windows, apparently you hold down Alt+0176. Linux is different and to achieve the same, hold down Ctrl+Shift and type …

Pluf – A PHP5 Port of Django

Pluf is a PHP Framework developed as a port of Django to PHP. It claims to be simple, elegant and easy for people used to Django but in PHP5 so easy to deploy all over the world. After reading the documentation, the file layout and concepts are all quite similar to django, though a downside …

How to compress css & javascript: An alternative to mod_deflate or mod_gzip

So, you have used Website Optimization Analyzer or you installed Yslow for Firefox or you discovered somewhere else that compressing your files (html, javascript & css) is a good thing to do. Unfortunately, it’s not always as easy as it looks to do this. In Apache web hosting environments, there is a module called mod_deflate …

How to Speed up Magento

Having implemented a number of websites now in Magento and being the web hosting provider for them also, it’s been both challenging and rewarding trying to get Magento running at an acceptable speed.People generally don’t understand what’s happening when they say “my website is slow”. So, for those of you unfamiliar with benchmarking / understanding …

Getting and Managing Free Fonts for Linux – aimed at Ubuntu

One area sadly lacking in most Linux installs is the availability of really nice fonts useful for design and great fonts are not cheap, circa $150 for a font set. Best all in one location for getting great free fonts, I think is www.fawnt.com If Ubuntu really wants to have a go at competing with …