October 1, 2016

Setting time on a Linux machine

Had to work with a CentOS VM in VirtualBox format for a bit, and needed to sync the time since it didn't have Guest Additions, and couldn't connect to internet so ntp daemon wouldn't work.

Steps:

sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/EST5EDT etc/localtime
sudo date MMDDhhmmYYYY
sudo hwclock --systohc

It's interesting that Unix keeps separate time from the system time, and how VirtualBox does not sync the virtual BIOS clock with the host computer when it's been turned on or restored. Makes sense I suppose, the VM is not running on host time.

On a side note, it's been quite some time since I've worked on Linux... Brought back some memories when I used to run Slackware on an old machine with two NICs, configuring iptables to work as my home firewall...

September 30, 2016

Github Pages from master branch

Now you can publish Github Pages directly from the master branch. You don't have to have gh-pages branch. Go to your project's settings and change the source of your Github Pages. Three choices are gh-pages, master, or master/docs.

Reference: Github Configuring Publishing Source

I've removed the gh-pages branch from multi-week-calendar. No more extra step of merging into gh-pages!

March 13, 2016

Git Flow Diagram

We've been using git flow with some slight changes here and there. I wanted to document the process for future reference. View the post for the full size image.

January 15, 2016

Git Case Sensitivity on Branch Name

I was trying to push a local branch to remote, but kept getting this error (simplified example):

git push -u origin Bugfix/Foobar
fatal: Bugfix/Foobar cannot be resolved to branch

After googling a bit, came across this StackOverflow question, and that got me thinking about case sensitivity, so I changed the "B" to "b":

git push -u origin bugfix/Foobar

And that worked. Yes, I was pushing to a *nix based server from my Windows machine, though perhaps the message given by git could've been more clear. Other people had already pushed branches with the lower case "bugfix" before, so my guess is that git on the remote server couldn't create the folder using "Bugfix"...