Archive for April 28, 2013

Amazon AWS Route 53 GEO DNS Configurations

You can send visitors to different servers based on country of their IP address using Amazon Route 53 cloud based dns server. For example, if you have a server in Amsterdam, a server in America, and a server in Singapore, then you can easily route traffic for visitors in Europe to the Amsterdam server, people in Asia go to the Singapore server and those in the rest of the world be served by the American server. This will results into the various kinds of benefits such as:
  1. Better performance as you are sending web site visitors to their nearest web server.
  2. Reduced load on origin.
  3. Geomarketing/online advertising.
  4. Restricting content to those geolocated in specific countries (I am not a big fan of DRM).
  5. In some cases you can get potentially lower costs and more.
In this post, I will explain how to configure and test GeoDNS using AWS Route 53 service.

Read more: "Amazon AWS Route 53 GEO DNS Configurations"

Tweet this    Share on Facebook

Find files between two dates


To print all the files from 19-10-2007 to 21-11-2007

$ find . -type f -exec ls -l –time-style=full-iso {} \; | awk ‘{print $6,$NF}’ | awk ‘{gsub(/-/,””,$1);print}’ | awk ‘$1>= 20071019 && $1<= 20071121 {print $2}’


and you can combined it with CP to find and copy files

Mac OS X: Mail – How to change the default account and “From” address


Mac OS X 10.0 through latest

The default account when composing a new message in Mail is the one listed first in the Description column of Mail Preferences. To change this default, you only need to change the order of the names.

Follow these steps:

      1. Choose Mail > Preferences.


      2. Click Accounts.


      3. Drag account names in the Description column to change their order. The account that is listed first is the default account that is used whenever you open a new mail window.

squid: block particular file extension .mp3 block


First open squid.conf file /etc/squid/squid.conf:
# vi /etc/squid/squid.conf
Now add following lines to your squid ACL section:
acl blockfiles urlpath_regex “/etc/squid/multimedia.files.acl”
Now create the the file
# vi /etc/squid/multimedia.files.acl
Save and close the file and Restart Squid:
# /etc/init.d/squid restart


but Cybercity blog goes one step further to show error message as well

VI / VIM editor movement commands to jump around the document / file


Here are some basic movement commands that may help you acquire a taste for more:

Move to the end of a word.
Move forward to the beginning of a word.
Move forward three words.
Move backward to the beginning of a word.
Move backward three words.
Move to the end of the line.
Move to the beginning of the line.
Move to the first non-blank character of the line.
Jump forward one sentence.
Jump backward one sentence.
Jump forward one paragraph.
Jump backward one paragraph.
Jump to the top of the screen.
Jump to the middle of the screen.
Jump to the bottom of the screen.
10<PageUp> or 10<CTRL-B>
Move 10 pages up.
5<PageDown> or 5<CTRL-F>
Move 5 pages down.
Jump to end of file.
Jump to beginning of file (same as gg).
Jump to line 50.
Jump to the beginning of the line of mark m.
Jump to the cursor position of mark m.
Return to the line where the cursor was before the latest jump.
(Two single quotes.)
Return to the cursor position before the latest jump (undo the jump).
(Two back ticks. This is above the Tab key on some keyboards.)
Jump to corresponding item, e.g. from an open brace to its matching closing brace.