Samsung Galaxy Clip

The video clip appeared on my facebook feed. Thought it was a very cleaver idea, which was created by Moonjong Hun (I’m pretty sure that’s the guy ’cause the video clip was embedded to fb by that person). It appears to be a school project.

Some companies already send the university student a job offer already???

vmware fusion and shared directory on a host machine

I’m using vmware fusion to create many development environments so that I have completely isolated ubuntu for client A, windows 2008 server R2 for client B, centos for client C, and so on.

Actually it was several months ago, but I was bothered to find a solution to this weird bug couple days.

On vm ubuntu, every time I use *composer* to update PHP project dependencies I end up with php parse error. They look something like this:

  • PHP Parse error: syntax error, unexpected ‘)’ in …
  • PHP Parse error: syntax error, unexpected ‘F’ in …
  • PHP Parse error: syntax error, unexpected $end
  • and so on…

BTW the temporary solution was to open a file, save, and then quit vim.

To fix the issue better than the temporary solution was:

  1. sudo (on the vm ubuntu)
  2. sudo apt-get install open-vm-tools

Since then I have not had the same issue before. Some reported that the solution that I took steps stopped working for them, but it wasn’t the case for me.

laravel’s database migration and seed

I have not used laravel 4’s migration and seed features much until couple days ago.
Oh boy, it’s a really sexy tool.

It does not matter whether you are in a team or you are all alone doing everything. It’s a feature that every single develop must use if integrating with a database!

Theoretically if you are a disciplined developer and use those features, confidence level of your database changes when deploying will be very high. I promise!

You will end up needing these if you decide to go with it:

*migration* file should be used for any changes that affect db schemas.
*seeding* file should be used to pre-populate data into db.

I thought it’d be beneficial to add some sample codes.

To create migration file, run this at Laravel’s app directory:

The above command line creates a file something like:

And its content looks something like this:

As you can take a guess, up method is where you change db schema. down method is where you rollback the change.

So let's say I want to add column "username" to "users" table.

(If you want to know more about available methods to manipulate db schema, click here.)

Now you want to run against your db? Then don't look further. Just run this:

After you run the command line, Laravel adds that particular code to migrations db table and that's how it keeps track of history.

Now you realize that you made a mistake and want to rollback your last change, run this:

I'll add seeding sample to the blog post later...

sports fans are awesome

Everytime I read a news article online, I notice that sports articles normally have 1k+ comments by users. It’s almost every article that caught my eyes while other articles have several to couple hundreds the most.

Does it prove that sports fans are awesome and very active in what they love?

I believe so.