Archive

Archive for the ‘Web’ Category

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 , , , ,

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 , , , ,

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

Plugin updates

March 8th, 2009

I updated 2 of my wordpress plugins.

Bookmark and Share  
 

Yejun Web ,

WordPress plugin Parallel Load

March 1st, 2009

My 3rd WordPress plugins is here.

This plugin will improve javascript loading time by load them in parallel. More info can be found here.

Bookmark and Share  
 

Yejun Web , , ,