Happiness or Achievement?

"Another major change is simply life outlook. While I was never the totally reckless type, and never all that obsessed with money, today the money just isn't particularly important. I want enough to ensure security, and it'd be nice to have enough to just work on my own projects, but I don't particularly care if I get rich. That changes my assessment of any startups drastically - I'm no longer prepared to jump at an opportunity to get rich if it's not something I'm sufficiently excited by. I don't feel I'm in a hurry to prove anything. I have what I need, and then some. I'm far more secure in myself in every way than I was at 19. I'm not going to pretend like I wouldn't love to get that multi-million exit, but it's not something that matters to me now (I'm sure it'd matter to me if it happened, though)."
-- vidarh, emphasis added
Which reminds me of a discussion I have with someone regarding life goal difference between woman and man. The former desire happiness and the later seek achievement. And both gender still wish for more money, giving the opportunity. Maybe I'm just generalizing.

Dnsmasq For Local Development Site

Found via HN. I've used to edit /etc/hosts file and add local testing site manually and it never occurs to me to use Dnsmasq to redirect all URLs that ends with .dev to 127.0.0.1.

Setup steps for Ubuntu as follows:
$ sudo apt-get install dnsmasq
$ echo 'address=/dev/127.0.0.1' | sudo tee /etc/dnsmasq.d/localhost.dev
$ sudo sed -i '1inameserver 127.0.0.1' /etc/resolv.conf
$ sudo service dnsmasq restart
$ dig foobar.dev @127.0.0.1| grep IN
$ ping foobar.dev

Simple yet smart way to use Dnsmasq.

Upgrading to Ubuntu Trusty Tahr 14.04

As usual, the recent release of Ubuntu 14.04 was a painstaking upgrading process for me again. My experience was similar to HN reader, etfb, where the upgrade crashed halfway causing conflicting and broken packages. I have to reboot to recovery mode and continued the installation forcefully by apt-get install -f. Luckily the data in my home directory was not corrupted and everything are still intact.

But that was the beginning of my dreadful recovery process. Since I've quite a lot of third parties PPA, especially GNOME 3 PPA. Both Gnome and Unity desktop refused to start up and let me log in. After some re-installation and config file removal, I managed to get my Gnome 3 session back. Don't even bother with Unity anymore since Gnome 3 plus the shell extensions solved most of my regular needs.

Kind of annoyed that I wasted the whole Saturday just to upgrade the distro. While some may say this is the price you'll have to pay if you fear of missing out (FOMO) of getting on the latest greatest. But, is advisable to get the latest updated version if you're using it on a laptop or any latest hardware. At least you can get more stable and faster drivers.

I like what wpietri said about different type of GNU/Linux users. A satisficers will accept the default settings where the maximizers will strive for the perfect setup. Those who use Ubuntu or Fedora are satisficers and maximizers will prefer ArchLinux or Gentoo. When you're young, extremely bored, and have plenty of time to kill, you will end up like the later group. As you age, time is limited and precious, you'll just want to get things to work and move on with something else with your life.

Looking at the bright side, painful as it may be, I've learned from sandGordon on how to setup a leaner Ubuntu installation. Furthermore, this release seems responsive on any laptop with Intel i3 processor compare my lappy unknown quad-core processor.

Almost Daily Git Rebasing Workflow

It used to be cumbersome and frustrating when I first learned how to do a rebasing, but these days, I'm slowly getting used to it. Yes, occasionally you still make mistakes, but branching is cheap and you can always recover from those mistakes. Let's look at my almost daily rebasing workflow. Typical steps as follows:

Getting the latest version from remote master branches.
$ git fetch
$ git rebase origin/master
Current branch master is up to date.

Create a new topic or feature branch from the master branch. Make sure you're in the master branch.
$ git checkout master
Already on 'master'

$ git checkout -b feature-x
Switched to a new branch 'feature-x'

Let’s create some dummy commits.
$ touch foo1; git add foo1; git commit -m "foo1"
$ touch foo1; git add foo1; git commit -m "foo1"

Inspired by David Baumgold’s great rebasing guide, find the last commit that your first branched off the master branch to create the feature-x branch.
$ git merge-base feature-x master
8454f7f3b1b9e224134d4336683597fb1ad290fa

Next, although optionally but if you like to have small and frequent commits, you should always squash, reword, or fixup your local changes through interactive rebasing before rebasing again the remote or origin master branch.
$ git rebase -i 8454f7f3b1b9e224134d4336683597fb1ad290fa

Or using different syntax, if you want to go back to previous commits before the current HEAD.
$ git rebase -i HEAD~2

Rebase interactively of both dummy commits.
reword b2dabc0 foo1
fixup d4add26 foo2

[detached HEAD 6af5a09] Add feature-x
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo1
[detached HEAD 7994cf7] Add feature-x
 2 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo1
 create mode 100644 foo2
Successfully rebased and updated refs/heads/feature-x.

If you realize that you’ve made a mistake after a successful rebasing, you can always undo it.
$ git reset --hard ORIG_HEAD

Rebasing against the master branch. In other words, changes in your feature-x branch will be reapply on top of the latest changes in master branch. Often you will need to fix or skip the conflict (something I need to practice more as I always messed up the merging).
$ git rebase origin/master

Optional steps, only if you encounter conflict.
$ git rebase --skip
$ git rebase --mergetool
$ git rebase --continue
$ git rebase --abort

If you've already published your changes, in this case, feature-x branch has been pushed before to the remote server, you’ll need to force-push your changes. Although some said forced update is bad, but is a compulsory step especially after rebasing from master branch to topic/feature branch before publishing.
$ git push -f origin feature-x