John Lai   [RSS Feed]

Svn Roll Back

November 7th, 2009 at 12:48 am

This is just for my own reference.

You can subversion roll back a file by using

svn merge -r 102:101 file-name

replace 102 and 101 with the revision numbers.

Written by John Lai

November 7th, 2009 at 12:48 am

Tagged with ,

Comments: Post first comment

Business is not about money

October 18th, 2009 at 12:16 pm

I’ve been self-employed for a year now.   Last year, I left my 9-5 job with a big company to pursue my own web projects.   Along the way, I learned more about business than any four-year-$40k university program could teach me.   Although I’m still new to business, I’m compelled to share some of my ideas on the subject - ideas that seasoned entrepreneurs may ridicule as naïve.  But hey, here goes…

Business is not about money.  It most definitely is not.

I grew up a Trekkie.  I dreamed of living in a laissez-faire communist society where humanity’s only wish was to better itself through compassion and understanding.  Money was the root of all evil and was abolished in the 21st century shortly after First Contact.  So for much of my life, I resented capitalism.  I wanted to work for free because it would be for the good of man kind.  Naturally, overtime, I realized that my philosophy was naive and misguided because people would always take advantage of free.  I needed a compromise between charity and exploitation, and hence, my new found appreciation for business.  Business, by my definition, is about making people happy without killing myself to do it.

Read more >>

Written by John Lai

October 18th, 2009 at 12:16 pm

1and1 vs. Bluehost vs. HostGator

October 11th, 2009 at 8:33 pm

I’ve been looking for new shared webhosting services.   I’ve been using 1and1.com for several years, bluehost.com for one year and hostgator.com for a few days.  I’ve been disappointed by all of them.  Perhaps my web needs have surpassed what shared hosting services can offer because each of the web hosting companies I’ve mentioned presented me with different debilitating problems.  Here’s a quick run-down:

1and1.com (Business Plan)

Pros: Very affordable
Cons: Limited number of databases, each limited to 100 mb, poor tech support, bad reputation

Bluehost.com

Pros: Very affordable, DNS changes are fast, decent customer service
Cons: I’ve experienced 4 downtimes in 1 month.  Tech support say they do not support subversion, so although I installed it myself, Bluehost system administrators may one day, without any warning, configure their servers in a way that disables my repositories.

Hostgator.com (Business Plan)

Pros: Very affordable, very good tech support (responds in less than 30 mins)
Cons: You can only connect/disconnect via SSH every 10 minutes.  You have to ask their system administrators to white list your IP if you want to repeatedly connect via SSH.  Their SSH is on port 2222.

I wish there were one hosting service that could grant me all my wishes.  But since I’m hard luck to find one, maybe it’s time for me to purchase a Virtual Private Server so that I can set things up the way I need them to be set up.

Written by John Lai

October 11th, 2009 at 8:33 pm

Tagged with , , ,

Comments: One comment

Toronto SEO Workshop

October 10th, 2009 at 12:16 pm

I’m proud to present the official launch of Toronto SEO Workshop website.

Visit the workshop to learn how you can drive more organic traffic to your site.  There’s also a neat SEO calculator you should checkout.

Have fun!

Written by John Lai

October 10th, 2009 at 12:16 pm

Tagged with

Comments: Post first comment

Why Start Up Freelances Fail

September 23rd, 2009 at 11:32 am

Top Ten Reasons why Design Firms Fail

I’m making the mistake of underquoting (due to lack of experience) and not charging for project modifications.

Written by John Lai

September 23rd, 2009 at 11:32 am

Comments: Post first comment

Time Management

September 17th, 2009 at 11:59 am

Another good article recommended to all freelancers, start up founders and workaholics..

Manage Your Time to Include You

Written by John Lai

September 17th, 2009 at 11:59 am

Comments: Post first comment

Girls Can Do Anything - Launched!

September 16th, 2009 at 10:05 pm

Another great site launched!

Girls Can Do Anything Magazine

Here’s a great Toronto Star article that describes what GCDAMagazine.com is all about - “Mothers work to counter-balance corrosive influence of pop culture”.

GCDAMagazine.com has so many great articles.  Here’s one I like, even though I’m not a girl…

How Do Siblings Stop Fighting and Start Getting Along

Written by John Lai

September 16th, 2009 at 10:05 pm

Comments: Post first comment

Valuable Skills an Employee Should Have

September 10th, 2009 at 10:28 am

From my experience working with a couple of co-op students, I’d have to say the two most valuable skills a new employee should have are: 1) to be able to read between the lines and 2) to be able to program software. The latter skill is obvious. The reason it takes a backseat to the former is because by the time you get to work with me, it’s a given that you know how to code or that you’re a quick learner.

Reading between the lines and anticipating future problems are extremely important skills. Many managers are over-worked. They manage several dozen concurrent projects and reply to hundreds of emails daily. So when a manager debriefs an employee on the details of a new project, s/he may forget to mention important project details. A good employee should be alert and s/he should ask the right questions to acquire the information s/he needs to successfully complete a project.

Many new grads think, “As soon as I know Subversion, Photoshop, Dreamweaver, I’ll be eligible for the job.” No….Not yet. You also have to read your boss’ mind and be one step ahead of him.

Written by John Lai

September 10th, 2009 at 10:28 am

Tagged with , ,

Comments: Post first comment

Svn Ignore Directory

September 1st, 2009 at 10:52 am

This is a note-to-self.    Sometimes when I want svn to ignore a whole bunch of files in a directory (example, I want svn to ignore files in my ./user_upload/ directory), I should follow the instructions below, which came from another forum.


$ svn mkdir spool
$ svn propset svn:ignore ‘*’ spool

—-

The value of svn:ignore is the list of file patterns to
ignore. See:

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.3

So you have two options, depending on whether you want the spool
directory itself to be in version control and have its contents
ignored, or whether you want the directory itself ignored as well.

If you want the former, create the directory, add it, then set the
svn:ignore property of that directory to ‘*’ to ignore everything in it.

$ svn mkdir spool
$ svn propset svn:ignore ‘*’ spool
$ svn ci -m ‘Adding “spool” and ignoring its contents.’

If you want the latter, do not add the directory, but rather set the
svn:ignore property of the parent directory to ’spool’.

$ mkdir spool
$ svn propset svn:ignore ’spool’ .
$ svn ci -m ‘Ignoring a directory called “spool”.’

If you had already added the spool directory but now realize you did
not want to, but want to preserve its contents, you can fix it this way:

$ svn export spool spool-tmp
$ svn rm spool
$ svn ci -m ‘Removing inadvertently added directory “spool”.’
$ mv spool-tmp spool
$ svn propset svn:ignore ’spool’ .
$ svn ci -m ‘Ignoring a directory called “spool”.’

Written by John Lai

September 1st, 2009 at 10:52 am

Tagged with , ,

Comments: Post first comment

MySQL Performance Testing - MySQL Profiler

August 19th, 2009 at 3:52 pm

Note to self, use the following tools to test query performance:

http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html

Written by John Lai

August 19th, 2009 at 3:52 pm

Comments: Post first comment