Monday, October 3, 2016

Second Half: How the work day gets split

I work in a technology company. Most of the times my own schedule and plan of work gets interrupted by unplanned aberrations like meeting requests, urgent client or partners needs or assistance needed by colleagues. I keep shoving this to the second half or namely the part of the day that follows the traditional lunch break. Soon I have so much to tend to in the Second Half that I ultimately start to feel overwhelmed. I depicted this in a graphic I created today:

The 8-hour work day and workload

Monday, September 5, 2016

GIT: Creating a new repository from a branch in an existing repository [Command Line]

This guide is for those users who have an existing repository(both local and remote) with one or many branches. They now want to create a new repository using one of these branches in their pre-existing repos. Lets for the sake of discussion call it old_repo

Steps to follow:

  1. Create a remote repository using existing clients that you may have (GitHub, GitLab)
  2. Assuming the remote that the remote repo now exists successfully, lets call it new_repo
  3. Go to a location file system in your file system where you want this new_repo to exist locally
  4. Follow these instructions:
  5. mkdir /path/to/new_repo (eg. C/Users/Omar/git/new_repo)
  6. cd /path/to/new_repo
  7. git --bare init (This will initialize your repository)
  8. Now go to the place of the existing repo
  9. cd /path/to/old_repo (eg. C/Users/Omar/git/old_repo)
  10. Assume we want to intialize the new remote repo with a branch called feature1. Also assume we would name this as master in the new repo
  11. Also ensure that the remote repo you just created is accessible to you via either HTTP or SSH (you can check with your project settings in GitLab or GITHub).For simplicity's sake, I am calling this http://mygit/new_repo.git
  12. Follow the command below:
  13. git push http://mygit/new_repo.git +feature:master
  14. Viola! The git would now take care of the proceedings for you now with something like this:
Counting objects: 2820, done.
Delta compression using up to 4 threads.
Writing objects: 100% (2820/2820), 3.35 MiB | 259.00 KiB/s, done
Total 2820 (delta 1667), reused 2112 (delta 1167)

Note: Please note that the branch names should exist as well as the remote path should be correct and accessible. Otherwise you may encounter an error such as this one:

"error: src refspec old_branhc does not match any."

If all goes well, you should see a message of this sort:

[new branch]      feature1 -> master

If you found this helpful, your comments would be highly appreciated.

With thanks to the answer posted on this link:

Sunday, June 19, 2016

When EasyPaisa is actually Mushkil Paisa - Part 1

Today I got stopped by traffic cops (the White Police as some would call them) at Hassan Square as I turned left towards University Road. I usually keep the following handy lest these be required for rainy days like today:

  1. Original CNIC: Often works like a charm and avoids unnecessary complications associated with photocopies. Furthermore, for Karachites, it is compulsory to carry one as requested by Rangers.
  2. Driving License (also pronounced as Lesance): Goes without saying, is compulsory and a must. Can't think of a driving license chilling at home and while you are prawling the streets in the city in your autmobile, can you?
  3. Original Car Registration Document: This could be the leaf page (recommended) found in your original book or the book itself if the flying leaf is missing. This is almost the 1st or the 2nd thing any cop would ask for. In my case, I carry both as I got my car transferred to my name and the leaf carries the name of the original owner so I need to have the Book as well to show my ownership.
  4. Tax Payment Receipt: This is also very important. Insure the tax is paid in the the period you are driving. Can lead to a Traffic Chalan.
  5. 3rd Party Insurance: Don't know why its important other than saving from a Traffic Chalan
So this ladies and gentleman, is the list of documents I insure are present in the car and on my person to face up to any police contingent in the city. Unfortunately, today my luck ran out as I didn't find the last item on the list above ie 3rd Party Insurance. I tried to talk sense to the traffic police officer who was actually adamant to get me stuck with some sort of a challan. When I mistakenly showed him a booklet that looked like a 3rd Party Insurance, he inquired for the insurance's expiry date(Imagine the length they would go to find some excuse to book you). He favoured me in one account by charging for an offence that cost less, No. 36 which is turning a wrong direction (I noticed this later). Hence instead of Rs.500 for the original offence, I was slated to pay Rs.150 for the reduced offence. 

Now on a Sunday afternoon with few shops open, on a Ramdhan weekend at noon time, I was left with an EasyPaisa chalan to show for my license. Hence began the actual ordeal which compelled to compose this blogpost.