Well here it is, my typical .gitignore file for every project. This doesn’t change much. Specially it is written for Yii Framework and CakePHP:
Well here it is, my typical .gitignore file for every project. This doesn’t change much. Specially it is written for Yii Framework and CakePHP:
Does your /etc/hosts file look like this?
Every request I made to gladlyCode.local takes 5 seconds to resolve to my local Apache server. Something was wrong!
If it does and you’re on Mac OS X Lion, you should change your VirtualHost names to something else. It turns out that Mac OS X Lion no longer looks up /etc/hosts first when you try to lookup a .local domain since are technically reserved for Multicast DNS (MDNS), or Bonjour. Starting Lion, it will lookup through MDNS first, and after the 5 second timeout, it checks with /etc/hosts.
This is at a cost of developer productivity and I have to change all my .local domains to .internal.kw.sg which is a domain name I own. I figured that if it is a domain name I own, it will never clash unknowingly. I changed ‘gladlycode.local’ into ‘gladlycode.internal.kw.sg’ and point it to 127.0.0.1 now. Now testing gladlyCode no longer takes 5 seconds per request (ridiculous!).
Alternatively you can use another top level domain (TLD) instead of .local and the common ones such as .com.
The reality with most projects is I typically work with origin master only. Only 10% of my projects is doing actual branching. (Yea, there probably should be an improvement on that figure.)
Here’s how to merge origin master by default.
You never have to see the following message again:
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "master"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
Every web developer uses his/her set of preferred tools. Here’s mine:
Other tools include:
Oh you murderer, but let me assist:
This kills all ssh processes. I use this often to kill all my ssh tunnels. It works in Mac OS X Lion as well as Ubuntu/Debian Linux.
As we put more and more into programs, debugging becomes time consuming. This quote is particularly true:
As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.
– Sir Maurice Wilkes
This is more for my own reference. This is my development computer’s httpd-vhosts.conf. I don’t suppose anyone would find this useful: Continue reading “My Apache Virtual Host file” »