AngularJS Free Course by Code School
May 26, 2014
I really enjoyed the course and definitely learned something new from it.
Configuring Elastic Beanstalk Environment with .ebextensions
May 22, 2014
At Captiv8, we are using Amazon AWS to host most of our PHP projects. We are heavily rely on Elastic Beanstalk to help us set up PHP environment, database and load balancer. On top of that, we are also managing our own server image based on Amazon AMI. In this image, we installed additional software and packages that we need for our application. However, this approach has a drawback as it is difficult to maintain the image and track changes.
Mar 27, 2014
Around October 2013, I decided to move from city to Gladesville which located 9 kilometres north-west of Sydney CBD. It wasn’t easy decision because I need to spend about 2 hours on commuting every day.
For the first couple months, I was fine with the long commuting time. I can distract myself with my phone or sleeping on the bus. However, I started to feel unproductive and I can feel it affected my concentration throughout the day.
Add 'current' class to website menu in Rails
Jan 15, 2014
It is common to have ‘active’ state or ‘current’ state on website navigation. This will help visitors to know which page they have selected.
This solution is based on Stackoverflow’s question which I couldn’t find. First, I’ll create a method inside Rails application_helper.rb file. I’ll call this method cp(). Here are the syntax:
1 2 3 4 5 6 module ApplicationHelper def cp(path) current_route = Rails.application.routes.recognize_path(path) "current" if current_page?(path) or params[:controller] == current_route[:controller] end end The method uses current_page and Rails.
Install the latest tmux on Ubuntu 12.04
Dec 06, 2013
In this post, I will show you how to install the latest tmux on Ubuntu 12.04. First, we need to install ‘add-apt-repository’ command on our machine. This can be done by running these commands:
1 2 3 sudo apt-get install software-properties-common sudo apt-get install python-software-properties After that you can add third party repository ( Ubuntu official repository does not have latest tmux at the moment )
1 2 3 4 5 sudo add-apt-repository ppa:pi-rho/dev sudo apt-get update sudo apt-get install tmux I will suggest you to install the latest tmux if you want to use Tmuxinator.
Rails 4 CORS
Oct 29, 2013
McFlyyy pointed out another solution to solve this problem. I haven’t tested it myself so follow it at your own risk Click Here I was trying to use Rails to build REST API for my AngularJS app and came across CORS error on my Chrome developer tools.
According to Alexey Vasiliev, Cross-origin resource sharing (CORS) is a web browser technology specification which defines ways for a web server to allow its resources to be accessed by a web page from a different domain.
Fix npm symlink problem in Vagrant
Oct 24, 2013
Today I encountered weird symlink error when trying to install npm modules on my Vagrant Ubuntu Box. The error says “pm ERR! Error: UNKNOWN, symlink ‘../which/bin/which’“.
After quick Google, it turns out the problem is caused by npm trying to create symlink which is not supported on Windows ( I am using Windows 8 as my host machine ).
Here is quick solution which allow you to install npm modules without creating any symlinks :
Trailing Characters ^M
Sep 18, 2013
This morning I ran into weird errors in one of my Vagrant machine. These errors come up when I was trying to run tmux and vim:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Error detected while processing /home/vagrant/.vimrc: line 1: E488: Trailing characters: nocompatible^M line 2: E488: Trailing characters: nu^M line 3: E488: Trailing characters: nobackup^M line 4: E488: Trailing characters: nowritebackup^M line 5: E488: Trailing characters: noswapfile^M line 6: E488: Trailing characters: hlsearch^M line 7: E488: Trailing characters: ruler^M line 8: E474: Invalid argument: laststatus=2^M line 9: E474: Invalid argument: tabstop=2^M line 10: E474: Invalid argument: shiftwidth=2^M line 11: E488: Trailing characters: expandtab^M Vim: Error reading input, exiting.
Zeus inside Vagrant
Sep 13, 2013
I have been using Vagrant as my development environment for the last couple weeks. It has been very helpful as I prefer to use Linux as my development environment and I can only use Windows at my workplace. With Vagrant, I can easily set up new Linux machine, install Vim plus all the plugins and completely separate development machine for each project.
Today, I was trying to use Zeus to speed up my Rspec test inside one of the Rails projects.
Aug 04, 2013
For the past few weeks, it seems that I am gradually moving into different life style. When I was still doing my course, it is almost impossible to spend time on the weekend to catch up with friends, walking around city and trying new stuff. Everytime my friend invited me to hang out with them I always said that I need to finish my assignments.
I remember one of my friend just asked me this question “So, what you usually do during the weekend ?