Sunday, September 21, 2014

How to use Flag Icons

Other Day I was facing problem in showing Flag icons against the country names. From where I should get all the icons and also I need to add all those icons on the images folder.

Then I found out a very cool way. CSS-SPRITES..
In this you download a single image to browser and based on pixel's shows the image.

Flag sprite can we obtained from following link Flag-Sprite

Wednesday, September 17, 2014

Meet a new Deadly UI framework

I was just trying to find out a alternative of Twitter Bootstrap. I then stumbled on Semantic-UI.

Semantic comes out with flying colors when I wrote a simple web-app with it. If this is properly supported , it will be a game-changer in how HTML/CSS is written.

Testing Webpages with AJAX requests locally

There can be cases where you might need to test the web-pages locally within your source tree and without deploying on web server.

Recently I faced a situation where I have to test my AngularJS App where I am using partials(templates). Partials are loaded through AJAX. If I tried to open the page in browser ,it stops me giving the Cross-Origin exception.

However there’s a simpler and lightweight solution for the lazy ones. You can use Python’s SimpleHTTPServer. It comes already bundled with python so you don’t need to install or configure anything at all!
So cd to your project directory, for instance
  • cd /home/erick/mysuperproject and then simply use
  • python -m SimpleHTTPServer And that’s it, you’ll see this message in your terminal
  • Serving HTTP on 0.0.0.0 port 8000 ... So now you can go back to your browser and visit http://0.0.0.0:8000 with all your directory files served there. You can configure the port and other things, just see the documentation. But this simply trick works for me when I’m in a rush to test a new library or work out a new idea.