Inline date edit with nojQuery

Inline Datepicker with vanilla JavaScript

I do write a lot of frontend, despite fact that I’m born to be backend guy. Long story short - we do have a lot of inline editing features especially elements like dates are pretty painful. HTML5 Introduced input type=date which is good enough to cover most of the cases, and we no longer need ugly and slow .datepicker() component from jQuery od 3rd party suppliers.

So if you do have edit you can just use <input type="date" value="yyyy-mm-dd"> field, and nice calendar will pop up. But we are looking for inline solution.

Never use file_get_contents to make URL queries

Why you should not ever use file_get_contents

As each programmer by nature I’m lazy. I try to accomplish as much as possible in minimum effort.

So whenever I use PHP to fetch something I’m using file_get_contents to make queries, and pull data from other services. So basically my favourite snippet is this guy here:

How to replace all links in html to markup

How to replace all links in html to markup

Regular expression to replace href to markup

Recently I moved my blog from Wordpress to Hugo , and that involved a lot of content fixing. One of the problems was that during the export not all HTML code was correctly transferred to markup. So I needed fix (replace) all pending <a href="">spidersoft</a> to [spidersoft]( What we need is just 2 simple regular expressions. One to find links <a.*?href="(.+?)".*?>(.+?)</a> Second one to replace them in reverse order [$2]($1)
Clearing up git submodules problems

Clearing up git submodules problems

As some of you noted I moved by blog into Hugo . During the build process you have to pull many git repositories to compile full project. Because begging are always hard. For me it’s always trial and error I ended up with having many sub-repositories missing. I’m not going to show whole journey how to solve “the issue”.