Dead Simple Laravel on Heroku

I assume that you already know how to use Git and Heroku. If you don’t, go to learn Git, and download Heroku toolbelt, of course you need to install Git in your computer.

Heroku is a rock solid PaaS platform for you to host web apps easily. With the new update from Heroku for supporting composer and of course, Laravel. PHP lovers now have one more damn good hosting option for their favorite framework Laravel.

Ho shit I love Laravel, it’s better than meth.

Now I just going to explain a few tweaks that you need to do to Laravel before it runs on Heroku.

Step 0: Create a Laravel Project

So as usual:

$ cd ~/apps
$ composer create-project laravel/laravel app_name

Wait! If you do not understand the lines above, you probably need to learn how to use PHP Composer. There is a chance you don’t even know you should do this thing in Terminal (OS X) or Git Bash (Windows).

What we just did is that we have moved into ~/apps folder and created a Laravel project, with any name of the app you like lah.

Then the next thing we need to do is initiate a git repository for the app, and create a heroku app then push it up!

$ git init
$ git add .
$ git commit -m 'Initialised Laravel'
$ heroku create
$ git push -u heroku master

But wait! Heroku recognized that it’s a PHP app but couldn’t proceed because… composer.lock is not checked in!

Step 1: Unignore composer.lock

Turns out, by default, Laravel’s default .gitignore has composer.lock to be ignored. Open up .gitignore and delete the line with composer.lock in it.

Then we recommit the .gitignore and try to push again. This time, we get this:



So what just happened?

Turns out that by default, Heroku thinks that your project root folder should have index.php to serve as homepage. But Laravel is different, the homepage is actually inside public/ folder.

So how do we make heroku serve public/index.php instead?

We need to add a Procfile. A Procfile (process file) declares the processes of the app, you got like web processes (deal with web requests) and background processes (queues or workers that send e-mails, do mundane tasks so web requests don’t get slowed down).

Step 2: Procfile

To make the Procfile, just create a new file named… Procfile and put it in project root. Inside Procfile, just write:

web: vendor/bin/heroku-php-apache2 public

Recommit, and push. It should work now.

Screen Shot 2014-05-19 at 8.49.30 PM

A Way To Deal With Group Assignments


  • Not everyone has the same level of interest in the assignment, some may want very high marks, some just want to pass the subject, but some has no interest at all.
  • One person may over-contribute the the project (especially the leader), some will do their part under orders, some will shrug it off.
  • You can’t force the low interest level people to participate.
  • People sometimes don’t like to take charge, but they don’t mind being ordered around to do stuff, in fact most are more comfortable being ordered than giving orders.
  • This is how real world works, in a company you will always have people slacking off and get away with it.

The key is, accept the human natures, instead of trying to change some people, adapt with them for the greater good.


Given the assumptions stated above, we are going to first describe how normal assignment groups work and why it caused a hell lot of frustrations.

There is a group of 6. The most enthusiastic one will always be the leader. There will be 3 members who don’t mind to be ordered around to do stuffs. But there will be 2 who doesn’t give a shit to the assignment.

The leader starts the discussion, the members sit there and listen to the leaders and at the same time, hope for someone else to say something. It didn’t happen, because everyone is doing the same. At the end the leader makes all the key decisions.

The leader doesn’t trust his members very much bout their capability due to how unhelpful they were during discussion, as his members are very passive about what they do. At the end he delegated very little or non-trivial parts of the assignment to his teammates.

Because of the 2 lazy bums, the 3 members eventually feel demotivated and contributed lesser.

The leader eventually feels frustrated too. Everyone’s output become lesser and lesser. The assignment will be considered as emotional toll to everyone contributed to it.

Now there are couple of problems:

  • The leader is paranoid about how capable normal people are.
  • The energy or motivation depletes in an infinite loop that is not being addressed. Everyone starts to think everyone is not doing their job and stop doing their job themselves.
  • The leader may be too much of a control freak, the members don’t have like they actually have right to say something, the morale depletes.
  • The leader think his members are not participating also, they are giving any feedbacks.


We are going to try to address the problems one by one.

First the leader has to drop the ego and trust other people. I think most of us make this mistake at some points of our lives.

Form a group within a group, find the most enthusiastic people and create an inner circle. This is the group that will execute most, if not the whole project. While it sounds counterproductive to leave out some group members with a potential to get complained by the lazy people, unfortunately, things need to get done and this is not time to let some assholes troll around your work and your marks.

Once you have an inner circle that stays active, you have already put the sandbags around the morale of your helpful team members. To keep the morale up, do your best to talk bad about the assholes in your group, this will actually make them feel good and do their work a lot better.

Now the leader has to learn how to delegate. Remember, the leader represents the group and its work. But the leader doesn’t necessarily do much, if not none of the assignment itself.

The leader does the following:

  • Serve as a liaison between the group members and teaching staff
  • Serve as a visionnary and make sure the project doesn’t go off track
  • Since he is emotionally detached from the actual work, he checks if the work is executed according to the plan, make sure it doesn’t cut corners.

This idea is not only sane, but it’s entirely normal in real life.

Take Apple’s CEO, does he design and engineer iPhone? No, he serves as the facade of Apple to outside world, to the customers. He checks if the product pipeline is aligned with the company goal (to make more money and maintain brand image). Since he doesn’t involve directly with the engineering of iPhone, he doesn’t know how tired the engineering process can be, so he can scold the engineers and ask them to do better job when necessary.

The leader is not necessarily registered in the assignment, the group members unconciously chose their leader, and the leader knows it. Lemme repeat, the leader’s name on report can be different from actual leader’s.

Huh? WTF is that supposed to mean? In too many cases, the leaders tend to be the most egoistic, or the oldest members in the group. Sometimes they have their own problems that can fail an entire project, simply because their interest level is too damn low. So another leader will come up within the group and lead the team through hellhole, completing the project and saves everyone’s asses.

OK now we have the leader settled, how about the members?

In a healthy group, the members will volunteer to take a share of the project. The passive ones will take the remaining. Their job is to do their part – writing report, or send survey form to 100 people. But they don’t speak to teaching staffs directly unless their part happened to be the group’s liaison with teaching staff.

They are sandboxed to just do their job.

In an advertising agency, we have suits, traffics, and minions(designers and developers). Suits are the ones who approach the clients, sweet talk to their clients and tell them how much they can do for them, then they close the deal and come to traffics. Traffics, as the name suggested, control the traffic and workloads of the designers and developers – to ensure they can meet deadline on time and ensure they are not overworked.

The suits’ job is to protect the interest of their clients and the company’s bank account. And the traffics are to protect the interest of human resources in the company, as well as to ensure deadlines are being met, by making sure suits don’t make promises that cannot be met.

So what do the minions do? They just do their part of job according to the timesheets. For example, to design 5 ad banners or to develop a game for that day. They are never exposed directly to suits and clients.

If suits approached the minions directly, the minions can choose to ignore them, because the suits must go through traffics to delegate the work to be done to the most available minion, or they will choose to outsource it.

We have talked about the leader and working members. How about the lazy ones?

As I have stated in the assumptions, we won’t bother try fixing them, I have tried that many times and I can say that doesn’t work.

Don’t waste your time making the whole group work delegation looks fair, the world is not fair and it won’t be even under your administration. Instead, cope with it.

You have a couple of choices on how to deal with them:

  • Report them to teaching staffs – but they can in return, complain that you did not give them work to do, it will be fatal to the entire group
  • Delegate work to them – they won’t do it, this is also fatal to the group
  • Cope with it – Pretend nothing happened, just submit the coursework.

In most companies, these people will be jobless. But unfortunately you simple can’t just fire people from the group without giving a good reason. If they don’t do work, they can blame it on your and your inner circle, which is worse.

Don’t worry, these people will face problems when they graduate and can’t find a good job. Karma will bite back.

Remember, your job is to ensure the group delivers the assignment, not to make everyone contributes the same amount of work.

Farewell TBG/Gushcloud

This e-mail is sent to all my colleagues in the morning.

Hey guys,

As you all know, today is my last day of working in TBG Interactive (aka Gushcloud) as developer. It had been a great 8 months here, I have learned a lot, grew a lot, had fun a lot, etc a lot. I had at least 16x more fun here than in my college. Dropping out and joining this company will always be one of the best decisions I have made in my life

First of all I would like to thank everyone that I have worked together with, we had fun together, and made apps that have delighted people’s life. Whether the app helps aspiring singers to be able to perform on stage, or get them some sweet supermarket vouchers so that they can celebrate Hari Raya, or app that helps kids in science discovery center to learn better through games and gifts, we have at least put a dent in lots of people’s life in tiny little ways. Oh yea, Gush Media, we managed scared the shit out of Nuffnang, well done everyone :D

Secondly, I would like to thank the bosses, Siang, Vincent and Althea, especially Althea. If it wasn’t you offering me a chance to work in our company in that lift, I will still be a sad little kid that does nothing useful in his life. I am sorry if I let you guys down sometimes, or I infuriated you guys for some things that I did, but at this moment, I wish you guys have great success in the future. All the best.

Siang, you have been a great boss of bringing in apps deal for us, without you I will have nothing significant to build and learn from. I would like you to be more punctual in the future though. (The whole company needs to)

Vincent, I will remember HER principles and I will work on them! You have been a very inspiring figure, sometimes I Google (stalk) you to dig up your stories. Wish you success in your business ventures and happy in your marriage! (If you can get a wife, I confirm plus chop can)

Finally, I would like to thank my teammates, housemates as well, especially Hafi. Hafi has been a great mentor while I waddling my way through in real working environment. You have taught me to be more organized, to be more responsible and to be more diligent in the future. We have quarreled sometimes due to difference in opinions or point of views, but we managed to get together well after that without any hard feeling. Thanks for making me a better person.

Dew, you have been a dewchebag sometimes (and still is), but you have taught me a lot as well, you have showed me the very different way of how Singaporeans live their life.

Bel you have been the only ang mo Chinese in this company, you have shared stories of how you traveled the world, that really makes me want to go on and live a life of digital nomad in the future. That’s what I will do before I die, I will live my life to the fullest and make sure I have seen the world before moving on to the other side of it.

To other coworkers: Shing, Hanis, Kien, Charmaine, Diming, Alvin, Jeremy, Daniel, Eleena. Thank you guys for working with me and putting with me immaturity for my last working days.

To other ex-coworkers: Edwin, Andy, Anna, William, Yun Sin, Joyce (now Fixx), Henner (now Fixx), <?= $those_who_i_have_forgotten ?>. Thank you all for having a great time together as well.

To GTF talk peeps: Colm, Reza, Torin, Darren, Henner etc. Thanks for sharing tech knowledge together sometimes, hope I am still in the Skype group so we can keep on continuing the sharing culture.

I can’t thank you guys enough for that.


My housemates

IMG_1222 IMG_1217