Archive

Archive for March, 2009

Undo email

March 19th, 2009

Google added undo send to their Gmail service.

It reminds me Naruto Please, Mr. Postman! episode. In which Naruto and Jiraiya trying to get back a manuscript from some hardcore postman.

Bookmark and Share  
 

Yejun Web , , , ,

Cloud Server

March 18th, 2009

I just ordered a new cloud server from mosso.

From the server IP address 67-23-8-*.slicehost.net, apparently it is a rebranded slicehost.

To fully utilize my vps, I also build a home-grow GeoDNS server. So if you visit my blog from different locations, you could possibly get 4 different IPs.

Bookmark and Share  
 

Yejun Uncategorized

Simple way to disable direcotry index in webserver

March 14th, 2009

This script will disable webserver’s directory index for currect directory and all subdirectories.

IFS=$'\n'
for i in $( find . -type d); do
    if [[ ! -f "$i/index.html" && ! -f "$i/index.php" ]]; then
        touch "$i/index.html"
    fi
done
Bookmark and Share  
 

Yejun Linux, Web , ,

Cloud files uploading script

March 13th, 2009

This is a very simple linux bash script to help uploading files to mosso cloud files.

Mosso uploading script: Mosso.sh
Updates: Here is a Mac OSX Version (provided by Bryan Rehbein)

You will also need curl .

After you sign up mosso cloud files service, first you need to login your mosso cloud files control panel then navigate to Your Account / API Access, where you will generate your API key. Edit the begin of mosso.sh

API_KEY=YOURAPIKEYHERE 
USER=yourusername 
CONTAINER=bucket

Now change to the directory where you want to upload files. e.g. a wordpress installation:

cd /srv/http/wordpress
bash mosso.sh wp-includes/js/jquery
Uploading wp-includes/js/jquery/jquery.table-hotkeys.js .... done.
Uploading wp-includes/js/jquery/interface.js .... done.
Uploading wp-includes/js/jquery/ui.core.js .... done.
Uploading wp-includes/js/jquery/jquery.color.js .... done.
Uploading wp-includes/js/jquery/ui.tabs.js .... done.
Uploading wp-includes/js/jquery/ui.resizable.js .... done.
Uploading wp-includes/js/jquery/jquery.hotkeys.js .... done.
Uploading wp-includes/js/jquery/ui.sortable.js .... done.
Uploading wp-includes/js/jquery/ui.dialog.js .... done.
Uploading wp-includes/js/jquery/jquery.js .... done.
Uploading wp-includes/js/jquery/ui.draggable.js .... done.
Uploading wp-includes/js/jquery/jquery.form.js .... done.
Uploading wp-includes/js/jquery/suggest.js .... done.
Uploading wp-includes/js/jquery/jquery.schedule.js .... done.
HTTP/1.1 202 Accepted
Date: Sat, 14 Mar 2009 00:06:41 GMT
Server: Apache
X-CDN-URI: http://cdn.cloudfiles.mosso.com/c12345
Content-Length: 0
Content-Type: text/plain; charset=UTF-8

Write down the url on the line begn with X-CDN-URI. This is your mosso CDN url. You can also find this url inside your mosso control panel.

If you want to upload entire current directory, you can execute this script without argument.

Bookmark and Share  
 

Yejun Linux, Web , , , ,

New CDN service

March 13th, 2009

Mosso’s new CDN service cost $0.22 per GB.

http://blog.mosso.com/2009/03/cloud-files-emerges/  

Updates:

Some simple tests show mosso cdn is just as fast as amazon cloud front. I offloaded some of my blog’s static image to mosso cloud files.

Pagetest  shows about 10% overall page loading time improvement.

I also wrote a simple bash script to help copying files. It seems mosso does not support gzip encoding yet, nor does cname support.

Some test result:

Pagetest from New Zealand:

New Zealand Waterfall

New Zealand Waterfall

 

New Zealand Connection

New Zealand Connection

Pagetest from VA USA:

 

VA USA

VA USA Waterfall

VA USA Connection

VA USA Connection

Bookmark and Share  
 

Yejun Uncategorized ,

EC2 new price

March 13th, 2009

Amazone just anounced reserved instance.

The 3 year reserved small instance price at 3.9 cents per hour, which is equalivalent to $28 per month. Not bad for a vps with 1.7GB ram and 160GB hard driver at all. But I have found some even lower priced VPS, $3.95 per month for 512MB ram with 1 year billing.

Bookmark and Share  
 

Yejun Linux, Web