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

copy-transmission

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

apple-mail-icon

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

block-website

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
\.[Ee][Xx][Ee]$
\.[Aa][Vv][Ii]$
\.[Mm][Pp][Gg]$
\.[Mm][Pp][Ee][Gg]$
\.[Mm][Pp]3$
Save and close the file and Restart Squid:
# /etc/init.d/squid restart
Courtesy: http://linuxpoison.blogspot.tw/2007/10/block-mp3-mpg-mpeg-exe-files-using.html

 

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

 

http://www.cyberciti.biz/faq/squid-content-filter-block-files/

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

vim-icon

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.
3w 
Move forward three words.
Move backward to the beginning of a word.
3b 
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.
1G 
Jump to beginning of file (same as gg).
50G 
Jump to line 50.
‘m 
Jump to the beginning of the line of mark m.
`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.