jQuery Image Resize Plugin v2.0

12 Comments

I found out there was already a jQuery plugin called ‘resize’ so I renamed my plugin to .aeImageResize

I also have included a better minified version of the plugin.

You can download the latest version from here

jQuery Resize Plugin – Dynamically resize images

No Comments

I finally managed to move my development code to Ubuntu and Git. So, lets kick start with the first Git Repository, jquery-image-resize. It includes example and minified version of the script.

Download the latest version:
jquery-resize.1.0.0a – tgz | zip

I’ll try my best to give support on my blog but if you find any issues, please report them to the Issue Tracker.

Quick and easy way to make websites load faster

No Comments

This is just a quick post to quickly get you to improve your website’s speed if you are running an Apache web server.

Create a .htaccess file (if one isn’t already present) and add the following lines at the end of the file:

 Apache configuration |  copy code |? 
01
# GZip
02
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
03
 
04
# Setting longer cache time
05
ExpiresActive On
06
ExpiresByType text/css "now plus 1 month"
07
ExpiresByType text/javascript "now plus 1 month"
08
ExpiresByType image/gif "now plus 1 month"
09
ExpiresByType image/png "now plus 1 month"
10
ExpiresByType image/jpeg "now plus 1 month"
11
ExpiresByType image/x-icon "now plus 1 month"
12

The first statement enables compression for HTML, plain text files, XML, JavaScript and CSS. Enabling compression means that the data is compressed before being transmitted. Less data to move means things can move along a lot quicker.

The second set of statements enable caching by file types, namely on CSS, JavaScript, GIF, JPG and ICO. Now I’m using a cache expiry date of one month, but you can use anything that suits you.

For example, if you make a lot of changes to the CSS and images, you might prefer files to expire after a day, in which case you can change it to:

 Apache configuration |  copy code |? 
1
ExpiresByType text/css "now plus 1 day"

The ExpiresByType can take in a number of keywords like: years, months, weeks, days, hours, etc. For more info, check out Alternative Interval Syntax for ExpiresByType.

If you have anything to add, feel free to drop it in the comments and I’ll update the post.

Google and Privacy and why I do not have a problem with it

No Comments

I know I’m playing with fire here and in the future I might hate myself for posting this but I have to get this out of my system. So here goes:

Google:

I google a lot. I cannot even think to browse the internet without Google Chrome. I love Google Mail and Google Docs. It is easy to conclude that I, umm kinda, like Google. But Google is much more than that. It is a multinational corporation, a pretty darn big one as a matter of fact. And it is not just any corporation, Google generates profit primarily from advertising through its AdWords program.

Privacy:

This is a term that gets thrown around a lot, but what does it actually mean to a consumer like me? Not much really.. When I’m driving around or even just walking into a store, I’m getting tracked by these CCTVs. The calls I make or texts I send are also tracked by my network provider. My mobile network provider needs to know exactly where I am to provide me service. Thanks to the recent x-ray security scanners at the airports, my body parts are up for grabs as well!

The era of ads and privacy:

Ever wondered why tooth brushes are placed near tooth pastes? Or why items on sale are placed near expensive goods aisle? I hope you get the idea. And this just does not end there. If you are watching TV, you are more likely to see ads related to the program you are watching. Last night I was watching a show about holiday resorts in Spain. During one of the breaks, I was advertised the cheapest flights to, umm, Spain. The advertisement industry needs to know who their potential customers are and where to find them to maximise conversion.

Knowing who to sell what (or for Google, knowing who to advertise what) reaps huge rewards. This particular selling tactic is not only critical to Google but it is used by every retail store on this planet. If I’m looking for a car, it is highly likely I would be interested in local car dealers or websites that sell cars. Its not any different than going through a magazine or newspaper looking for something that catches my interest (just more time consuming).

Google tries to track different aspects, some basic, others controversial but the main reason behind is to provide with us more useful information (and, of course, ads). This just not saves time but improves our experience of using Google Web Search. For example, when I search for “golf”, am I interested in the sport or the Volkswagen Golf?

Why I do not have a problem with Google’s take on privacy:

To help Google to help me, I need Google to know what I’m interested in. I certainly do not mind being shown some ‘sponsored ads’ that might get me a special deal. I’m a professional programmer and when I’m in the middle of my work and need to look something up; it is really critical that the information I’m looking for gets to me as soon as possible because any time spent off searching is taking me off my thought process.

I know its a big risk and ask from Google to not be evil and continue developing and improving its services but that is one risk I’m willing to take. I certainly can’t imagine leaving Google Mail because it is a brilliant product. Soon, I’d be leaving my iPhone 3G to move to Google Android-based smart phone (more on this in another post). I know I’ve heard rumours that Google might launch a phone-based ad service where if I drive by Asda (UK version of Walmart), I’d see ads from Asda (or special offers). My question is .. what is wrong with that? If I have to choose between going to Asda to find offers, I’d prefer getting updates on my phone instead!

Stop Dr. Web Antivirus Update Emails

4 Comments

After months of painful emails about Dr. Web updates, I finally found a solution:

Log in as root (or you can use sudo) and open /etc/drweb/drweb32.ini:

Look for:
CronSummary = Yes

And change it to:
CronSummary = No

Do a restart for the Dr. Web daemon by (add sudo in the beginning if not using root):
/etc/init.d/drwebd restart

That should do it! Seems so easy once you know it.
Please do leave a comment if this works for you :)

The problem:

Just a bit of background about the problem. I have been using Plesk 8.4 and been really happy with it. I’ve gone through all the versions but the latest one Plesk 9.3 had been sending me these weird emails:

From: MAILER-DAEMON@example.com
To: anonymous@example.com
Subject: failure notice

Hi. This is the qmail-send program at example.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

:

--- Below this line is a copy of the message.

Return-Path:
Received: (qmail 22133 invoked by uid 100); 20 Mar 2010 19:00:10 +0000
Date: 20 Mar 2010 19:00:10 +0000
Message-ID: <20100320190010.22131.qmail@example.com>
From: root@example.com (Cron Daemon)
To: drweb@example.com
Subject: Cron /opt/drweb/update.pl
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env:
X-Cron-Env:
X-Cron-Env: X-Cron-Env:
X-Cron-Env:

Dr.Web (R) update details:
Update server: http://update.msk5.drweb.com/unix/500
Update has begun at Sat Mar 20 19:00:02 2010
Update has finished at Sat Mar 20 19:00:10 2010

Following files has been updated:
/var/drweb/bases/drwtoday.vdb
/var/drweb/bases/dwntoday.vdb
/var/drweb/bases/dwrtoday.vdb
/var/drweb/updates/timestamp

And you usually get one of these an hour! Thats 24 a day! Crazyyyy!

Older Entries