Update GitHub forked repository — April 14, 2015

Update GitHub forked repository

# Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

# Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

# Make sure that you're on your master branch:

git checkout master

# Rewrite your master branch so that any commits of yours that aren't already in upstream/master are replayed on top of that other branch:

git rebase upstream/master

# Lastly push it to master

git push -f origin master
Elaboration of Life — January 26, 2015

Elaboration of Life

What if I say that you looks like a mouse? Surely whosoever standing before me gonna shout on me or maybe punch me hard. But we (humans) are 75% similar to mouse. Now that’s Strange!. But you don’t need to look like a mouse for proving that 75% similarity. There are various other things in our body where we can see that similarity for example : genes.

Genie of Life

Have you ever wonder what special thing present in all top class athletes which makes them most popular among all of us. Do they born with special powers? Scientist have found out that these athletes have something common in them. What special thing they have? So that special thing which they have and also present in all of us is “Gene”.


Gene is like a blueprint of our body. It is the basic physical and functional unit of heredity which we get half from father and half from mother. Genes, which are made up of DNA, act as instructions to make molecules called proteins. The Human Genome Project has estimated that humans have between 20,000 and 25,000 genes. These Genes present in cells.

Genes in cell

Every human being has cell in it and it is estimated that single human being may contain 75 to 100 trillion cells in it. Inside cell the is nucleus within each nucleus we have “X” shaped structured called chromosome. There are 46 chromosomes 23 from father and 23 from mother. And within that chromosomes we have bundled called Gene or DNA.


DNA stands for deoxyribonucleic acid. Most DNA is located in the cell nucleus (where it is called nuclear DNA), but a small amount of DNA can also be found in the mitochondria. The information in DNA is stored as a code made up of four chemical bases: adenine (A), guanine (G), cytosine (C), and thymine (T). DNA bases pair up with each other, A with T and C with G, to form units called base pairs. In real-time there are about 4-5 million bases in single DNA sequence. Human DNA consists of about 3 billion bases, and more than 99 percent of those bases are the same in all people. DNA is just the basic structure it dose not tell us what to do. Like I want to shake my hand, want to jump etc. are not tell by DNA. Actual functions are performed by something we called Protein. Building block of proteins are called Amino Acids. So which amino acid will be formed with which base can seen Codon table.

I wrote above that “more than 99 percent of those bases are the same in all people” what does that mean?

When the cell is getting manufactured then the DNA get copied. During that replication a minor change in DNA will change whole structure of body. Lets take an example we know there are 4 bases in DNA: A, T, C, G and A paired with T and C with G. With these bases combination amino acid produce eg: ATG pair will produce “Methionine acid”. Take A, T and G bases for our example. Now suppose cell start replicating during first copy combination is ATG which is “Methionine acid”. During second copy it’s same ATG i.e “Methionine acid” but during third replication the middle T changed into G so it become AGG which is “Arginine acid”. With single change in base will change whole amino acid. So we are 99 % similar but that one sequence replacement can me us small or tall, guy with brown hair or black hair. This we called it as SNP’s (single nucleotide polymorphism)

RedShift for Ubuntu 14.04 — December 22, 2014

RedShift for Ubuntu 14.04

Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. This program is inspired by f.lux.

Installation :

$ sudo apt-get install redshift gtk-redshift

Open launcher (window button) type redshift and see magic. To quit it look into icon tray (bulb icon) click on it and quit.

Another way to launch it

  • Press
Alt + F2 and type "redshift" in prompt.
  • To close it or to toggle it, open terminal and type
$ sudo killall redshift
Zoom effect implemented — December 9, 2014

Zoom effect implemented

It’s been two and half week that I keep on struggling for implementing zoom effect in my book. I tried alot but sometimes images start fluctuating, sometimes user unable to move zoom pages, sometimes slider not shown properly and so on errors.  So I decided to learn little more javascript and then dive into master code. After two days of learning JS I come back to my work and start implementing code in it. After spending six hours on code I’m able to complete almost everything regarding flipBook. Now one can zoom it, turn pages and goto particular chapter with single click. Now it’s seems easy to work in turn.js as I learned so many things while doing this task. Few things like :

  1. First and last page as hard page like in real book.
    To give hard page effect in book one need to use 4 or 5 lines of code if he’s using turn.js
    for eg:

     <div class="hard"></div>
     <div class="hard"></div>
     <div class="hard p393"></div>
     <div class="hard p394"></div>

    This will give hard effect to front, front-back page and last-inside, last-outside page.

  2. To implement zoom effect I created <div> and use functions of in-build zoom.min.js
        flipbook: $('.magazine'),
        max: function() { 
            return largeMagazineWidth()/$('.magazine').width();
       when: {
          swipeLeft: function() {
        swipeRight: function() {
        resize: function(event, scale, page, pageElement) {
        if (scale==1)
            loadSmallPage(page, pageElement);
            loadLargePage(page, pageElement);
        zoomIn: function () {
        if (!window.escTip && !$.isTouch) {
            escTip = true;
       $('<div />', {'class': 'exit-message'}).
            html('<div>Press ESC to exit</div>').
            animate({opacity:0}, 500, function() {
  3. To implement index at the top is created <div> magazine. To update index when clicked on it i.e if I click on chapter 3 then number three should displayed on right side of book and when I clicked on chapter 4 then number 4 get highlighted and number 3 should moved to left side of page for that is used updatetab function
    function updateTabs() {
    var tabs = {11:'1-', 19:'2-', 26:'3-', 42:'4-', 67:'5-', 79:'6-', 95:'7-', 113:'8-', 143:'9-', 150:'10-', 165:'11-', 217:'12-', 246:'13-', 272:'14-', 276:'15-', 280:'16-', 297:'17-', 307:'18-', 351:'19'},
    left = [],
    right = [],
    book = $('.magazine-viewport .container .magazine'),
    actualPage = book.turn('page'),
    view = book.turn('view');
        for (var page in tabs) {
             var isHere = $.inArray(parseInt(page, 10), view)!=-1;
         if (page>actualPage && !isHere)
             right.push('<a href="#page/' + page + '">' + tabs[page] + '</a>');
         else if (isHere) {
             if (page%2===0)
                 left.push('<a href="#page/' + page + '" class="on">' + tabs[page] + '</a>');
                right.push('<a href="#page/' + page + '" class="on">' + tabs[page] + '</a>');
            } else
                left.push('<a href="#page/' + page + '">' + tabs[page] + '</a>');
    $('.magazine-viewport .container .magazine .tabs .left').html(left.join(''));
    $('.magazine-viewport .container .magazine .tabs .right').html(right.join(''));

    This code will update the index.

Also, as I see the most of the things are worked out in JS, even the
flip task was in JS. I have joined the onlinecourse for JS do the
things at advance level. Moreover my previous course MongoDB was over
and I am eagerly waiting for the certificate with a score of 85%.

Smart-TeX ;) — December 7, 2014

Smart-TeX ;)

I was done with seven and half chapter but now I was getting
frustrated, and it was been too long, I talked to the Sir and asked to
distribute the chapters to everyone.
The same day I posted a mail, asking for whosever is interested and
the next I gave the presentation on how- todos. But very important,
before the presentation, I asked to choose the chapters themselves, so
that no-one can blame me for more or less work :P Everyone randomly
chose the chapters and I think this was a smart trick :P

In the presentation, just gave the small overview of LaTeX, then
coming to the important points:

  • How to use the macros, like I had defined the macros images i.e for
    subfigures, tables, itemize and certain more. Showed them the usage of
  • About the equations: As there were lot of equations, ensured for
    the usage of the particular packages
  • And certain more :P

    Now, the things were distributed, hope to have the book soon.

Protocols for LaTeX Book — December 5, 2014

Protocols for LaTeX Book

First chapter fully complete now. I had the fourth chapter already
with me, but I had to improve it as it was in accordance with the
previous settings and improper use of LaTeX. I had used  too many
dollar($) sign, which is not good to use as it tells LaTeX to do the
things forcibly. So, I had to clean-up the code for that. Also I had
lot of equations, so I just made some packages as the primary one.

1) flushleft
2) eqnarray
3) align
4) alignat

Flushleft will apply left aligning setting in all equations, and to
ident some of the lines I used \hspace.
We have monoeuations(single equal to(=)), bi-equations. For
monoequations align is used.
Coming to eqnarray and alignat, they are almost the same but with some
notable differences:

  • eqnarray has two alignment points (it’s basically just array with a
    default preamble) whereas align has one. x + y &=& z versus x + y &= z
  • eqnarray changes the spacing at the alignment points depending on
    different factors whereas align keeps it fixed (which is generally
    what you want)
  • eqnarray allows page breaks between lines and align doesn’t

Using them I fulfilling the needs of the book.

Obstacles in zoom effect —

Obstacles in zoom effect

After adding some more spices(chapters) to the book, I opted for doing
the flip task of the book. The two main problems I faced was:

  • The zoom effect
  • The slider below

Slider showed the view of the pages as it was moved, but after the
view of the first ten pages, it started repeating i.e Only view of
first 10 pages was shown, to overcome it, either we could add the
images for the view or to remove the view.

I decided to remove, as adding the pictures would increase the size,
it was already 191MB, adding the images for 400 pages approximately
would make it heavy and would lower down the processing speed.

Security Protocols — December 3, 2014

Security Protocols

Today I took leave from my work and learned something different. That different thing is “Security Protocols ”

Many security protocols have been developed as VPNs, each offering differing levels of security and features. Among the more common are:

  • Secure Sockets Layer (SSL) and Transport Layer Security (TLS): SSL and TLS are used extensively in the security of online retailers and service providers. These protocols operate using a handshake method. As IBM explains, “A HTTP-based SSL connection is always initiated by the client using a URL starting with https:// instead of with http://. At the beginning of an SSL session, an SSL handshake is performed. This handshake produces the cryptographic parameters of the session.” These parameters, typically digital certificates, are the means by which the two systems exchange encryption keys, authenticate the session, and create the secure connection.
  • Secure Shell (SSH): SSH creates both the VPN tunnel and the encryption that protects it. This allows users to transfer information unsecured data by routing the traffic from remote fileservers through an encrypted channel. The data itself isn’t encrypted but the channel its moving through is. SSH connections are created by the SSH client, which forwards traffic from a local port one on the remote server. All data between the two ends of the tunnel flow through these specified ports.
  • Point-to-Point Tunneling Protocol (PPTP): PPTP is a ubiquitous VPN protocol used since the mid 1990s and can be installed on a huge variety of operating systems has been around since the days of Windows 95. But, like L2TP, PPTP doesn’t do encryption, it simply tunnels and encapsulates the data packet. Instead, a secondary protocol such as GRE or TCP has to be used as well to handle the encryption. And while the level of security PPTP provides has been eclipsed by new methods, the protocol remains a strong one, albeit not the most secure.
  • Layer 2 Tunneling Protocol (L2TP)/IPsec: The L2TP and IPsec protocols combine their best individual features to create a highly secure VPN client. Since L2TP isn’t capable of encryption, it instead generates the tunnel while the IPSec protocol handles encryption, channel security, and data integrity checks to ensure all of the packets have arrived and that the channel has not been compromised.



Finally work on track — November 30, 2014

Finally work on track

The problem with fi-screen and pdfscreen was solved now.As after the review everyone liked to go with the the default settings i.e fiscreen, because of its style, colors it caught the eyes of everyone. So using that I completed with the first chapter of the book and asked for the Sir’s review. After the positive response of everyone, my next task was to complete the chapters.

There were 19 chapters, and I had to complete them :P

Fiscreen vs Pdfscreen. — November 27, 2014

Fiscreen vs Pdfscreen.

I had a confusion regarding the pdf that I made as the, default one
used the package fi-screen and another pdf screen. Both worked
similarly, them which one needs to be used. Another thing was that Tug
India used document class as document, but Sir asked to generate the
book for which the document class is book. So I made both asked for
the reviews. Mostly everyone chose the default one. Even Sir suggested
to not the change the colors, and not go for any kind of hard coding.
Made my own macros and completed the first two chapters with that :)


Get every new post delivered to your Inbox.

Join 55 other followers