Tuesday, July 21, 2015

Google Materialize: I’m impressed

Wandering on the internet I came across this front end web framework called Google materialize and I find it impressive.

You can have a look at it here.

I have been experimenting with twitter bootstrap for some time and currently I am in process of porting my website CouponIndia to bootstrap as my website is not currently mobile friendly.

I liked Google materialise as it looks like the new material design that google has introduced in newer android versions. I always believe that if your target audience is not too tech savvy you should stick to the designs your users are familiar with. As Indians use android phones more than any other platform chances are they will find websites built with Google materialize familiar to use.

I am here not saying that bootstrap is not user friendly and I myself find it very well polished and awesome product with lots of features. I only think Google materialize can be used as its alternative.

Wednesday, July 15, 2015

Dead

Most of my blogs and websites have gone dead.

Need to rejuvenate few.

This time need to be selective.

Too many blogs and websites are making things difficult.

I am letting few domains expire even though they have great potential but time is not on my side.

Lets see how things fold now.

Definitely need a new plan.

Too much learning, too little implementation.

Too much hunger for knowledge is holding me down.

I need to break free.

Why couldn’t I write here more often.

Why can’t I write a tiny post daily even if its a single line.

Let me start with that.

Tuesday, December 23, 2014

Location of JDK 17 on mac

If you are looking for the location of JDK 1.7 after installing run this command in terminal
/usr/libexec/java_home -v 1.7
This will give you the location of JDK.
If you are looking for another version just change the version code at the end.

This is how it worked for me

Friday, December 5, 2014

How to define multiple CSS attributes in jQuery

I have been doing like this
$('#id).css('background-color': '#ffff00', );
$('#id).css('color', '#ff0000');

yes it works but Could be done like this using chaining 
$('#id).css('background-color': '#ffff00'.css('color', '#ff0000'); 



But still the better way is to do like this

$('#' + id).css({'background-color': '#ffff00','color': '#ff0000'});
#notice the curly braces Even better way is to simply change class of the element using jquery

Saturday, November 29, 2014

How to replace a character in MySQL table

Use this command in phpMyAdmin or in MySQL console:

update tablename set column_name = replace(column_name, 'character_to_be_replaced', 'characer_to_replaced_with');

For example:
I wanted to replace '&' with 'and' in table named 'tags' and column name 'tag' because that interfered with the URL.
I used following command

update tags set tag = replace(tag, '&', 'and');

I hope this help

Wednesday, August 27, 2014

How this work

I have been doing all of this online stuff alone for many years now and have realized that if you do things alone it becomes quite difficult to keep yourself motivated for long.

All the big wig entrepreneurs preach this very basic principle of getting started with any start-up:

Never start alone.

I followed this advice this time and started a basic online tutorial blog on wordpress with my friend Dev.

We purchased our first domains together about 6 years ago and started blogging. Learnt together but never actually did any project together.

We got separated in between. I shifted to different town, he got new job and we gone on with our lives separately.

Now after all those years we again thought of sharing our knowledge and this time we thought of doing some project together.

So, we created this blog howthiswork.net. I purchased this domain a month ago when there was no plans that I am going to do this with Dev but when the idea came of doing something together we started on this domain.

We started on 15th august and till today we have written 16 blog posts.

I hope we will continue to work along and get successful in this endeavour.

Friday, August 8, 2014

Clear Mac OSX DNS cache

Here is the command to clear Mac OSX DNS cache.
sudo killall -HUP mDNSResponder
Works only on Mountain lion or lion

Saturday, June 28, 2014

Location on App Engine SDK in Mac OSX

I use PyCharm to develop Google app engine python application. I updated it to newer version recently. After the update it started showing me this:
"error: please specify a valid app engine SDK folder"
This PyCharm error came up whenever tried to launch the application.
I tried finding the location of Google app engine SDK and it took me some time to figure it out. If you are also looking for fixing the same, here is where you should point PyCharm to:

/usr/local/google_appengine 
that's a symlink that links to the Google App engine SDK.
Hope this help.

PS: If you are find its broken after updating app engine app to newer version open the app as it requires setting it up again after updating.

Sunday, June 8, 2014

How to clear php session files via ssh

My linux vps was giving problem and I found it’s because php was saving all the session files and now thousands of session files were causing the trouble.
To get it fixed I needed to remove/delete the session files.

To remove session files first I located the path where php is saving session files using this command
php -r 'echo session_save_path(), "\n";'

When I tried to remove the files by using the usual file/directory removing command
$ rm –r /session-path/*

It gave me following error
bash: /bin/rm: Argument list too long

After some googling I found this command that worked for me
$ rm -r /session-path/

Nothing special in this command just ‘*’ is not typed in the end but it does the trick.
It deletes the directory and all the saved session files.

Remember to recreate the directory or you will have login errors.
To do that use this command:
$ mkdir /session-path/

I hope it help.