Archive for the 'webmastering' Category

Amazon s3 versioning

Bookmark and Share

Amazon now offers what I would veritably call “indestructable fool proof” file storage. S3 already provides an extremely high level storage durability - multiple geographically separated copies of your data. Now Amazon have taken it a step further with versioning, so even if you accidentally delete your data it’s still safe.

The amazon S3 announcement which just popped into my inbox:

We are pleased to announce the availability of the Versioning feature for beta use across all of our Amazon S3 Regions. Versioning allows you to preserve, retrieve, and restore every version of every object in an Amazon S3 bucket. Once you enable Versioning for a bucket, Amazon S3 preserves existing objects any time you perform a PUT, POST, COPY, or DELETE operation on them. By default, GET requests will retrieve the most recently written version. Older versions of an overwritten or deleted object can be retrieved by specifying a version in the request.

You can read more about how to use versioning here.

Obviously you’ll have to pay for the extra space taken up by versions, but this looks like a really top class option for storing data that’s not regularly updated e.g. an image archive.

Also be interested to see if this spawns any new uses for Amazon web services…

Cloud Computing Price Comparison

Bookmark and Share

Apples and Lizards

I’ve just been researching the estimated cost of cloud computing on some of the various providers out there who want to absorb your servers into their clouds.

Doing this research has been like comparing apples to lizards. The providers all have their own way of billing you, and there’s a whole host of extra features offered, some free, some not. To help you on your quest I present some nice tables with the results of my investigations here.

data

I tried taking a fixed monthly budget and seeing what best value I could get for the money as I think this is a fairer and more realistic comparison. I have as far as possible searched for the best deals (e.g. using amazon’s reserved instances and GoGrid’s pre-pay plans).

Price Resource EC2 GoGrid RackSpace VPS.net
$100/Month CPU 3×1GHz 1Xeon 2GHz* 2.8GHz

Ram (GB) 4.2 1 2 1.7

Storage (GB) 480 60 80 70

B/W (GB) 130 0 80 1750

$200/Month CPU 2xDual2Ghz 1Xeon 4Ghz** 6GHz

Ram (GB) 15 1.5 4 3.8

Storage (GB) 1700 90 160 150

B/W (GB) 100 206 80 3750

$500/Month CPU 4xDual2Ghz 3×1Xeon 4×2Ghz* 3×4.8Ghz

Ram (GB) 30 9 8 9

Storage (GB) 3400 420 320 360

B/W (GB) 550 0 500 9000

$1000/Month CPU 8xDual2Ghz 3×3Xeon 2xquadx2Ghz 6×7.2Ghz

Ram (GB) 60 12 16 28

Storage (GB) 6800 520 620 1080

B/W (GB) 1200 1000 1000 27000

* The 2Ghz is actually 1/8th of a 2xquad core 2Ghz machine
* The 4Ghz is actually 1/4th of a 2xquad core 2Ghz machine

Alas GoGrid only displays “Xeon” for the CPU, no further info seems to be divulged.

If the shoe fits

It’s become evident to me that you have to find the best fit for your needs (and future needs) in terms of price and features. It seems Amazon is the cheapest in terms of Memory and CPU, VPS.net by far the best for B/W while GoGrid throws in great freebies such as 100% SLA + Load balancing.

Here’s some quick facts to throw into the mix:

Amazon

  • No persistant storage (you can use EBS or S3 for this at extra cost)
  • No SLA
  • Support costs $100/month or $400/month
  • Lot’s of complementary services (Storage, RDB, Billing etc.)

GoGrid

  • 100% SLA
  • Free Load Balancer
  • Free 24/7 support

Rackspace

VPS.net

  • Free Daily Backups
  • Support $99/month (includes 100% SLA)

Some price comparison tools

Anyway, I’d be interested to hear anyone’s real experiences with hosting services in the cloud.

Cyber Mercenaries For Hire

Bookmark and Share

I have one or two allegedly white hat friends and enjoy stories of lore and legend regarding their chivilarous and well contained sporting activites. However when it comes to professional cyber crime, I feel my Tokyo life is somewhat sheltered from the darker forces that glide through the veins and fibre cables of the internet (this may be in part to being a non-windows user), so I was rather intreiged by one of this morning’s comments on my blog:

Tired of a competitor’s site? Hinder the enemy? Fed pioneers or copywriters?

Kill their sites! How? We will help you in this!
Obstructions of any site, portal, shop!

Different types of attacks: Date-attack, Trash, Attack, Attack, etc. Intellectual
You can work on schedule, as well as the simultaneous attack of several sites.

On average the data, ordered the site falls within 5 minutes after the start. As a demonstration of our capabilities, allows screening.

Our prices

24 hours of attack - $ 70
12 hours of the attack - $ 50
1 hour attack - $ 25

I note that perhaps a copywriter/proof reader might benefit this particular ‘Cyber Mercenary’, or perhaps there is a subtle difference in the third line between ‘Attack’ and ‘Attack’ to which I am not yet attuned.

Oh, and here’s an example attack that was “clearly ordered by someone”.

My Secret Voodoo SEO Technique

Bookmark and Share

I’ve been on the fringe of the SEO industry for over 10 years now. I’ve have watched it change from the good old days of when keyword stuffing would get you at the top of AltaVista to the modern day which uses some of the worlds most sophisticated software and technology.

And after experimenting, researching, listening to White Hats, Black Hats and an entourage of other SEO guru’s I’ve come to the conclusion that now-a-days effective “SEO” has become pretty simple. Not necessarily easy, but it is simple. The 3 steps below are my ’secret’ formula which has worked well, for instance most of our business leads for The Artists Web come from natural search and our advertising budget is practically zero.

Step 1. Get a high Page Rank

This is more important than anything else and also significantly more difficult than the following steps. I’m sure you already know what Page Rank is - and that getting a high PR is basically down to how many quality incoming links you have. In essence what the rest of the internet is doing is more important than what you do on your own site.

In my opinion, the most effective long term ways of getting incoming links are

  • Have a regularly updated interesting website/blog
  • Create a great web service
  • Create some viral content
  • Make lots of friends

Step 2. Know your target subject and keywords

Your website has a theme, and you have a target audience you wish to attract. Obviously the theme and the search terms your target audience use must align. Moreover use keyword tools to find out the specific language most commonly used - for example is which term is most searched “sell artwork” or “sell paintings”?

Step 3. Create a high PR page for the subject/keyword in question and apply a few simple techniques

Finally you create a page on your site, give it as much page rank as you can and make sure you are using the keywords appropriately. These techniques will help, but they are no silver bullet - really the without the first step (getting the high page rank) any SEO ‘technique’ is going to be of limited use.

  • Link to the page from every page on your site, or at least from your higher PR pages e.g. the home page. This ensures you are allocating as much page rank to the page as you can.
  • Put the main keywords in the page title
  • Write a compelling Meta Description, the meta description is often used on the search results page, this is your chance to write some compelling copy which encourages people to click on your link. Don’t worry about keywords, consider it similar to writing the copy on a paid search advert.
    Meta Description appearing in search results
  • Phrase your copy to natuarlly include search phrases. This is the only ‘trick’ that I use, just bare in mind your target search phrases. e.g. for the phrase “sell paintings”:

    Okay

    Selling paintings online is easy with our service.

    Better

    Our service helps you easily sell paintings.

  • Use appropriate keywords in the url e.g.
    Bad

    /page.php?id=1232

    Good

    /how-to-sell-paintings

Surely it’s not that simple?

Well actually I think it is. Basically google (for now english language search is pretty much all about google) has some of the best brains and technology continually working to ensure it has the most relevant, useful and authoritative results. It’s therefore simple enough to presume that long term the most relevant, useful and authoritative results will tend to feature first, so really all you have to do is be relevant, useful and authoritative - simple, but not necessarily easy. Yes there are plenty of other techniques and factors (HTML validation, link anchor text, page cachebility) but none of them

Finally, don’t cheat

And don’t be tempted to go for any ‘black hat‘ SEO technique - do not run the risk of being penalised. Think long term and focus on quality.

CodeIgniter Language File Translator

Bookmark and Share

Owen Christian and myself have cooked up a nice little code igniter language file translator. This is a controller and series of views that you can drop in on your CI install and then use a nice front end to manage administration of the language files for your application.

This is meant for people to be able to edit the standard application language files in your CI install, which work with the CI Language Class. The basic idea is that you have a master language, and then this allows translators to translate into other languages.

Features

  • UTF8 support
  • Handles php in language strings
  • Synchronises language keys with ‘master’ language
  • Checks php for syntax errors

Download

Download version 0.5.1 here

Installation

  1. Unpack archive tar -zxvf translator-0.5.tgz
  2. Copy files into appropriate location in your CI install (or just unpack archive over your install)
  3. If your language files are in an exotic location, edit config/translator.php
  4. set language files to be writable by your webserver
  5. that’s it!

Usage

  1. (If you haven’t already) Create your master language files and keys e.g.:
    language/english/file1_lang.php $lang['file1_some_key'] = ’some key’; $lang['file2_another_key'] = ‘another key’; etc.
  2. Create corresponding ’slave’ language files e.g.:
    language/japanese/file1_lang.php
    NB You don’t have to create the keys, just the empty writable files
  3. Make sure language files are webserver writable
  4. Fire up your new controller i.e. index.php/translator and go!

Screen Shots

translator top Translator - choose file to translate translate file

Code Igniter Japanese Localisation

Bookmark and Share

Following on from a previous note about Japanese and code igniter, I just found a Japanese language pack for code igniter on http://www.cilab.info/. There’s a Japanese turorial and user guide aswell if that takes your fancy.

Domain names in Japan

Bookmark and Share

p1010481.JPG

Not long after the first time I arrived in Tokyo I noticed (amongst a vast array of other wierd and wonderful things) a common trend among the advertisements on the metro, TV and just about anywhere, and that was the ’search term’ call to action. Although most of the paper adverts will at least list a URL the real call to action is search box with the keywords inside and a mouse pointer hovering over the search button.

This struck me as a dangerous strategy - intstantly you’re telling your competition which terms to bid on and in many cases these terms are quite esoteric and not particularly hard to get natural rankings for. In fact I actually did a little experiment, and for the keyword of one particular advert I put up an almost empty page with the japanese keyword as the title and within a few weeks start receiving search traffic, I think the page still ranks about 6th (look for anglojapanese.net): search for てんるす.

However I have since come to the realisation that this search call to action is much easier for the Japanese customers to remember than a URL using the (less familiar) Roman alphabet, therefore it’s a risk advertisers have to take. So why not use japanese words in the domain? Anyone West of Turkey will be familiar with the heavy use of keyword domains - www.cheapfilghts.co.uk etc. Can’t the japanese do this aswell?

Well they can, as any ‘domainer’ out there will tell you, one has been able to register “International Domain Names” (i.e. domains with non-roman alphabets - chinese, cyrillic etc.) for a number of years now. But (a big but) good old microsoft have only started to support use of IDNs with IE7, so this is probably a key factor.

Anyway I would expect this trend to change in the near future as IE6 usuage shrinks while more modern browsers with IDN support, such as firefox and IE7 take hold. So I’d hazzard a guess Japanese Language urls start cropping up on the metro ads. In fact I’ve taken a punt myself: インテリアアート.jp
オフショア.jp
モダンアート.jp
アート販売.com
オフィスレンタル.jp
水彩.jp
現代作家.com
ネットギャラリー.jp

Adding a user to phpbb3 from an external script

Bookmark and Share

So working on a phpbb2 -> phpbb3 upgrade this weekend and the final part was updating the script to sync my applications user table with phpbb3, so users of my application automatically have an account on the forum with the same credentials.

phpbb3 has a new password handling system so it’s not so simple to write raw queries to insert/update the phpbb database. Instead, after a little research I opted to use phpbb’s own functions to add a new user. As noted here and here you can call the user_add function from includes/functions_user.php. This works fine until you want to call the function from inside another function as noted on the above links, it’s a little tricky getting it to work.

I managed to come up with a fairly simple solution - you need to declare a number of key variables as global at the top of your function so they are in scope when you include the phpbb files.

define(’IN_PHPBB’, true);
/* set scope for variables required later */
global $phpbb_root_path;
global $phpEx;
global $db;
global $config;
global $user;
global $auth;
global $cache;
global $template;

# your php extension
$phpEx = substr(strrchr(__FILE__, ‘.’), 1);
$phpbb_root_path = ;

/* includes all the libraries etc. required */
require($phpbb_root_path .”common.php”);
$user->session_begin();
$auth->acl($user->data);

/* the file with the actual goodies */
require($phpbb_root_path .”includes/functions_user.php”);

/* All the user data (I think you can set other database fields aswell, these seem to be required )*/
$user_row = array(
‘username’ => “Username”,
‘user_password’ => md5(”Password”), ‘user_email’ => “Email”,
‘group_id’ => $default_group_id,
‘user_timezone’ => ‘1.00′,
‘user_dst’ => 0,
‘user_lang’ => ‘en’,
‘user_type’ => ‘0′,
‘user_actkey’ => ”,
‘user_dateformat’ => ‘d M Y H:i’,
‘user_style’ => $not_sure_what_this_is,
‘user_regdate’ => time(),
);

/* Now Register user */
$phpbb_user_id = user_add($user_row);

Japanese charaters in code igniter urls

Bookmark and Share

Code igniter is restrictive over permitted url characters (a good thing!), and it’s simple enough to edit the permitted_uri_config option to add more charaters. However, what if you’re dealing with Japanese charaters in the url?

Well (after a little searching) it turns out that this isn’t too difficult to fix as the config value is a regex and one can add the kanji charater ranges in a similar fashion to the standard ascii ‘a-z’ syntax:


$config['permitted_uri_chars'] = ‘a-z 0-9~%.:_-’;
        ↓
$config['permitted_uri_chars'] = ‘一-龠ぁ-んァ-ヴーa-zA-Z0-9a-z 0-9~%.:_-’;

courtesy of: http://pricewave.blog110.fc2.com/blog-category-4.html

setting up terminal and vim for japanese on osx

Bookmark and Share

I’d hazzard a guess that there aren’t a great deal of non-japanese vi users on osx who need to work in japanese, but at the very least this will serve as a reminder for myself later on!

First up, the most useful resource I found was the following page http://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/vimjp.html (thanks to Taku Yamanaka!)

If you can read Japanese, then follow his instructions otherwise, the key steps are:

Setting up VIM

edit. you ~/.vimrc file and add:

:set enc=utf-8
:set fenc=utf-8
:set fencs=iso-2022-jp,euc-jp,cp932

Edit your terminal settings

  • File -> Show Info (ファイル>情報を見る)
  • Go to Emulation (エミュレーション)
  • uncheck Escape non-Ascii characters (非Ascii文字をエスケープする)
  • Go To Display (ディスプレイ)
  • Check Wide glyphs count as 2 columns (ワイドグリフは2桁とカウントする) and Wide glyphs for Japanes/Chinese/etc.(日本語や中国語などにワイドグリフを使用する)
  • You’ll probably want to make the settings default (設定をデフォルトとして使用)

Bash

For good measure you might want to tweak bash. Edit ~/.profile and add:

export LC_CTYPE=en_US.UTF-8

Edit ~/.inputrc and add:

set input-meta on
set output-meta on
set convert-meta off
set meta-flag on
set output-meta on

You’ll need to reload bash for these changes to take affect - close and reopen terminal.


About MrKirkland

more...

Tweets

Posting tweet...

Timezone

  • JST: 2010-03-13 02:12
  • GMT: 2010-03-12 17:12
  • PST: 2010-03-12 09:12
  • EDT: 2010-03-12 13:12

About

You are currently browsing the Mr Kirkland weblog archives for the webmastering category.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.