Fixing Bower install issues



Bower Install Issues :

Accessing git Protocol issue:

When trying bower install to install dependencies listed in bower.json(can modify) file , sometimes following error is encountered.
github.com[0: 207.97.227.239]: errno=Connection timed out
To overcome this error a small change can be made in .gitconfig file in the user's home directory.
git config --global url."https://".insteadOf git://
Using this all git commands will perform a substitution of git:// to https://
nnn


SSL Certificate verification Isssue :

 If you encounter the following error during installing dependencies :


exit code of #128 error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://github.com/ 
If you have an older version of browser or OS version, this can be fixed by updating it.

Or you can run the following command to modify your git config file.



git config --global http.sslVerify false
This will mandate not to verify certificates for the packages downloaded.


Please feel free to leave comments over any similar issues faced.

Ember Js Installation on Ubuntu 14.04


Hello,

I faced few issues while installing it so listing down steps below incase it helps people :

Ember.js needs node.js and phantom js so we need to install them as well.

Installing NodeJs.

Follow the commands below :
sudo apt-get update
sudo apt-get install nodejs 
This should work straight forward, if not please check your internet connection. Then,
sudo apt-get install npm
 Above command will install nodejs successfully. But due to ubuntu packet mismatch it names it nodejs. Hence you need to use nodejs everywhere instead of node. Check installed version :
 nodejs --version
If you wish to avoid writing nodejs, you can create a symlink for the executable.
sudo ln -s /usr/bin/nodejs /usr/bin/node
Emberjs still uses node command internally so its better to create the above symlink.

Installing EmberJs and PhantomJs


npm install -g ember-cli
npm install -g phantomjs
Above commands will install ember and phantomjs and you can create ember projects from command line.
 ember new my-app
This might give some error if your system doesn't have git installed, install it using :
sudo apt-get install git
Then your project will be successfully created. More details can be found here .




Setting up wordpress in your local system


Easy Wordpress Installation for Novice in wordpress:

Download wordpress from http://wordpress.org/download/

Install Lamp/Wamp/Xampp any hosting server on your local machine and run the server.

Make sure the url http://localhost/ works and shows some page in browser.

Copy the downloaded wordpress folder to /var/www (for apache) or any other directory depending on the root of your server(i.e. the directory where your localhost points to)

Now you can hit the Url http://localhost/wordpress/ and it should work if you copied the code properly 

Assuming you have installed mysql (during installation of LAMP) or any database client, you can create a new database to be used for wordpress or you may want to use an existing one.    eg.Suppose i created a test database and hence will use it for wordpress. 

Now in the form you can follow instructions shown on page http://localhost/wordpress/ and configure the server and create title, give username, password to create wp-config.php .It will automatically create table in your selected database for you.

Or else you can just go to wp-config-sample.php and modify and rename it

After this when you hit the url again you should be able to see your blog site and the first post.

You can modify and create new post by going to http://localhost/wordpress/wp-admin

Using Pjax to make page navigation user friendly



Understanding this, requires a little knowledge of Javascript, Jquery and Ajax. Pjax is nothing more but an extension of Ajax with the support of push state.

First of let us understand what is page navigation, when ever user encounters a page link which may be a different page in the same site using , he is redirected to that page. It basically means content of the current page are removed and that page are loaded along with all the javacript and css, which may not be different from current page, (it may not be so if we take browser caching into consideration).

But again the point here is that using pjax this complete action can be avoided and only the required content which changes, could be loaded(which is exactly what happens in ajax), but with the difference that url will also change, and user understands this a different page, and he can use back and forward button as if the page has actually navigated.

You can see the complete working demo here.
Now how do we do it. Very basic and simplest method :
  • Include Jquery and Pjax file in your script files.
  • you can use normal href links, but in javascript you have to use jquery. eg.


    $('a').click(function(e){
     window.pjax.fetch($(this).attr('href'),'body#id');
    // body#id is the body element id where the content should be fetched to
    });



Also Note that the body id for pjax needs to be present in both the pages i.e. the current page, and the new page. Basically behind the scene the content of body#id from new page will replace content of body#id in the current page. That's it. Happy Pjaxing!!

Image downloading script


Download Multiple Images from a website in one go
   
Now this post will be a bit of technical, i was just trying to write a neat little script to download all the images from national geography photo contest images (and of course not wanting to do it manually).

So i developed a script in php, which would require you to have a working internet connection of course, and a apache server setup or anything similar (like tomcat may be) where you can run your php file on browser. In the file crawl.php i am going to share, you can even change the url to make it work for some similar url where images are hosted. The file also needs a basic php file simplehtmldom.php to be in the same folder.

The output will create a file a.txt with the link of images. Now you can use any downloader to get the images in required places.

I used :
wget  -i a.txt 
it will download all the links in the current folder.
Hope it was of some use, you can comment in case of any queries or clarifications.

Feeling Poetic


Not sure what to write, but started anyway thinking what is good for me, pursuing and going after what I am not interested in just because others are going after. No, i don't think so, why shouldn't i do what i like.
It's my life and i can do what ever i like.

I read a couple of blogs from my friends today including couple of stories , poems, articles etc. and I got highly motivated. I always liked writing but I am not sure why I have been pushing this hobby away. I always thought first read and lets be a man (i.e. earn a handsome salary) and love what you do. Now when I have got that , why should i run faster (if I am satisfied with my pace).

I am always satisfied with very small things, thinking there are people who don't get even this. Am I wrong to be satisfied? I don't thinks so. I have time to pursue my hobby, that's a good thing.

In general and also literally I like to walk slow, that way I notice the minute details people tend to often miss. I feel consistency and constant attitude is better than to just rush to things. I am very patient and feel that patience can earn you many things you never imagined. People always rush for things as if its the end of life. But I feel differently, I think let it pass there will be something else if not this, life is full of opportunity and if one passed another will come. But that does not mean I would completely neglect the first one, i will try to utilize and hone it but wouldn't die for it (i.e. to make so much effort that if it were not possible, i will go under depression).

I have always had conflicts and adjustments problems with the surroundings because people are generally impatient and like to see quick results as if the life will run out and they miss out the beauty of the life.
  
This all may seem philosophical but its how i feel everyday, and it applies to day to day and also literally. Sometimes I tend to confused at my thoughts and these are some serious stuff which can't be discussed with general friend.

So i think it's better to do what you feel good about rather that making yourself available for other even when you aren't enjoying any of it (and may be neither are they). So there is hardly any point in doing what you don't feel good about. I will try to be regular now. :P:D

Updating myself

Hi all

Many things have changed, I am writing a blog after a long (very long) gap, Few major changes in my life would be getting a job, moving to Bangalore and taking up the responsibility for my family. Pretty cool Huh..!!

What was on my mind these times..Started writing a book, or at least thought of and believe me wrote a paragraph (I need some compliment...i don't care if you disagree) and yeah what's always on my mind (girls ...lots of them).

Recently Saw a Play "Bikhre Bimb" enacted by a sole actor Arundhati Nag, She is a marvelous actor.
And for sure i loved it. I have always been fascinated with literature. Observing myself, and things around us I feel that the subject for a simple or a complex story could be the life (the human beings) itself. Each person has a beautiful story to tell , obviously it needs a pretty narration. There are so many threads and small details in life that we often tend to miss them in this fast life.


 I have the nasty habit of noticing people, how they react to things and thinking what must be going on in their mind at that particular time. And this makes me take valid guesses about some one's personalities and behavior.  I am good at approaching people and convincing them what i want to (At least i feel so..what's wrong in bragging :) .

Did you wonder why did i put the picture of a Sudoku cube above, Because life is like a cube if you know how to arrange pieces it looks beautiful otherwise you are gonna spend a lot of time sorting it out.

This update is long enough and i promise myself for the next update pretty soon. 

Atheist vs Luck

Hi friends

I went around in my head several times to write on this topic. You would wonder why this topic, its because i have 2 conflicting ideologies within me and they both convince me that they are right in their own perspective.

I am atheist that is i hardly believe in existence of God. In answer to questions like how is everything in the order i always think that there is always a stabilization phase in every aspect and order comes automatically. I think people need God to soothe themselves, they need some kind of idol (which doesn't speak) to speak their heart and confess for the guilts they have done. Also God creates a notion in the society that there is good and evil i.e. people think once before committing any crime but again this doesn't stop people from committing them.

Here comes my second ideology i believe everything happens for a reason. Whenever something bad happens i convince myself that there is good coming my way. You should accept whatever comes your way and not frown over it. This is completely how i feel. Its not that you should do nothing about any failures you face, you must try to remove your shortcomings and rest assured success will come your way one way or the other.
 Please feel free to comment.

Why Do I Love Hollywood?

Hey everybody,
Hollywood is very fascinating, since my first year in college i have watched hundreds of Hollywood movies, TV shows , drama , reality shows.

What makes them so interesting? That's a question we all know the answer because they do lots of background check and labor on their projects but Hollywood projects are compromised pretty much. There the stars are molded according to the script and here the scripts are molded according to the stars.

Other reason is the cinematography their sound effects and video quality give a soothing feeling which can make u forget the world around u.

The most important point why we love to watch it is because we are fascinated by their lifestyles and talks , the culture they follow.

TV shows are also a big hit:
i love friends, prison break, heroes etc.

I watched a TV show Dexter a really lovely and very different TV show. It's main character is a forensic expert and he has the thing with blood he likes cold murders so in childhood he is molded into a crime killer by his foster father . And there the story begins of a murderer hero You will love him for his killings and his cruelly. There are 3 seasons which have been premiered till now. And all three all full of thrills and suspense including the ice truck killer and the bay harbor butcher.

Republic day at college



Hello everyone,

We all celebrate republic day with much or less enthusiasm. Be it in our hearts or a public show. And we all know we have been celebrating it since we were very small(...We didn't know what it meant then...as if we know now..), but that's not the point here.

We all grew up seeing flag hoist singing together the national anthem, and most important then waiting for the sweets..(I don't know about you but
I was very fond of them.). And later there would be boring (Moral lectures) speeches about what we should do and what we shouldn't, which in our country is so common.

I think the track of time changed its course and advancing to college changed my perspective of viewing the day as I adored it then. There have been many noticeable changes, only if we are willing and strong enough to acknowledge them.

Very first of all is the feeling which seeded in our small young hearts on the name of this day..we would be so full of enthusiasm and patriotic feelings. We would listen to story of martyrs and freedom fighters who shed their blood for us. But now it has become a stereotype, what has changed..? It's we na..? We think what good it would do if stop and think about country for a day and celebrate ? We have listening time and again "you should work for the progress of our country", India is our motherland, we should make it proud" etc.

Do we really care? Second point is , in colleges the trend of speeches have changed too..we no longer listen to lengthy speeches about our freedom fighters. But we focus ourselves on what the country has and what we need, which is a good aspect.

Nevertheless, I think on this occasion whatever we think or do effects nation in one way or the other. One of my professor Dr. G, C. Nandi told us,"we have been always told if you go out and work for other countries, you are not making nation proud, but since we are Indian, so if we do something significant that will only show our nation of path to glory even if we are not in the nation."
So I would say work from where you are, feel what you like to feel , do what you like to do but never forget your motherland and remember you have breathed the air and grew up so playing in its lap. Even if you say you are an Indian(..with feeling of course..) that will make all the difference.

novel reading(Prey....about artificial intelligence)

Hi buddies,

It's my one of the hobbies of chewing and churning out my literal hunger by whatever comes into my hands of literal worth. I don't know how this hobby developed(..you may call me a geek..) but since my childhood i loved the literature. I read too many story books and comics then, and when I was a teenager I went through serious English and Hindi literature. 

But you know advancing to college, and associating myself with computers i became much of a movie addict. But nevertheless novels are still my favourite.
Recently I went through 'PREY' one of the novel by Michael Crichton. He is also the author of 'Jurassic Park' . He writes thrilling and captivating stories and you feel as if you were watching a Hollywood movie.

I liked the novel since it contained many things related to our course. The main character of the story Jack Forman studied Biology and later studied the life cycles of living organisms like swarms, ants etc.. When he switched to Artificial Intelligence (..We had a course on AI last sem and a course on soft computing this sem...) he was able to apply them in algorithms in more sophisticated way, because he had an edge over the other programmers.

He develops a prey-predator system, because most of intelligent system can fail in hostile situations. But the predator system (..the hungry ones..) will always find its goal to prey.
It's about adaptation. His algorithm is used to develop nano robotic swarm cameras which can't be destroyed since they are very small. They can communicate through the limited memory and sensors and telecast images.

But they are not able to survive in the real world, due to high winds and other factors. A company is about to sink, so the decision is taken to unleash them and let them learn on their own. But that's when the contamination occurs, and yes they learn but theirs generation becomes so advanced that they become the real predators and human becomes the prey.

You will have to go through the novel to catch its twists and thrills.
Please post comments.

Life


hey,

I have been thinking of writing lengthy blogs. I don't know what i am gonna write but what's pretty important today is that i have finally decided to work my way through keyboard to u guys though there maybe hardly anyone.

In my early childhood when i was in class vth i used to write stories based on TV serials we used to watch, there was a friend of mine who helped me in writing we two were very popular in this regard. People ya our frns spent lots of their time reading it, we used to create imaginary situations and imaginary people. We ourselves were pretty fascinated by our own stories.

Anyway the phase passed the first time blogging on internet came to me when i was in 12th std. through the yahoo 360 pages(you must have heard about it) but it wasn't so cool. I wrote blogs of 1-2 sentences then. When i joined my college then i knew about the blogger i registered but i never wrote anything significant. Ibibo blogs were also very popular i used them more than google but then i diverted back and came back to one an only blogger.

And now that i have come i can't say how many posts will be there from me and you know i have emphasised these days on my typing skills so time wouln't be a factor nowadays.