Disable Animation (animate.css) on Mobile Device

If you using any css animation library and which creates some problem (appearing scroll bar, bouncing element, etc) on the mobile display. Here I have shared a code snippet to disable animation on a mobile device. Add this codes in your stylesheet to overcome this issue.

https://gist.github.com/sohelrana820/d8e6de0317b9e005df40bbc10da7543b

Source Tree pull You have not concluded your merge (MERGE_HEAD exists)?

Sometimes we got this error message (Source Tree pull You have not concluded your merge (MERGE_HEAD exists)?) while we are working through GIT. It’s a wired issue and sometimes very dangerous. Here I have shared very short tips to overcome this scenario

Af first tries git commit. If it doesn’t work, you run this command

git merge --abort
git reset --merge

Hope this will help you to solve your problem.

Tooltips require “Tether” on Bootstrap V4

Four options are available in tooltip: top, right, bottom, and left aligned.

Tooltip on Bootstrap

We may all know that Bootstrap version 4 is now available. That’s why I’m trying to practice some methods of it and facing an error in tooltips method. Whenever I have used this then it’s not working. So here “Tether” have to use to show tooltip if you work on Bootstrap V4.

Bootstrap 4 needs Tether, so you need to include tether.min.js before you include bootstrap.min.js, eg.

<script src="https://npmcdn.com/tether@1.2.4/dist/js/tether.min.js"></script>
<script src="https://npmcdn.com/bootstrap@4.0.0-alpha.5/dist/js/bootstrap.min.js"></script>

Migrate website in 3 steps – Google Webmaster

Sometimes we want to migrate website. And it’s a complex task if you thinks it, but it’s not like that. Google crawl our website regularly, so when google didn’t find those old link, he will put our search rank to a lower position. Sounds bad, isn’t it?

So what if we inform google, that Hey Google! I am migrating my web address to a new address, he will be pleased and informed that site is changed. So your SERP rank will not affected. Now let’s see how we could do that.

Migrate website:

  1. Login to webmaster account and click on settings icon on top right side.
  2. Redirect content by using 301 redirects.
  3. Add and verify new domain.

 

Migrate web address

 

Create Custom Filter in Twig Inside Slim Framework

As we know twig is the most powerful, fastest, secured, modern templating engine. It comes with a lot’s of built-in features like block, extends, import, filter etc (see the reference docs). Also, it has the option to add the custom filter based on your need. So the developers can create their own filter based on their needed. This article will help you to do that. Here I am using Twig with Slim framework (version 3.X).

Create Custom Filter in Twig

An example Custom Filter:

https://gist.github.com/sohelrana820/be49697a0b246ba7fc88d27f5a9719dc

From the above snippet, you can see a filter is created called ‘twig_custom_filter‘ and then added that into the twig environment.  To use this filter into view just call it. (e.g. {{some_variable | twig_custom_filter}})