-
For a recent project that deals with events, I wanted to give users an option to download event details as a PDF. I have considered several PHP pdf generation libraries and finally settled with Dompdf. Dompdf is an easy to user HTML to PDF converter PHP library. It supports CSS styling, inline style tags and…
-
It used to be that when you want to start new project in LAMP you install LAMP/MAMP/WAMP/XAMP on your machine and spin up the project. For a recent WordPress theme development project I have decided to try wordpress using docker. Actually it was very cleaner way than downloading new WordPress archive and config manually. Docker…
-
You can use bootstrap modal in vuejs without jquery or any other libraries. To do that you need to get the modal instance associated with a DOM element using the getInstance method. Recently I was revamping a user profile page made with bootstrap and jQuery. I got stuck on this problem that Bootstrap modals didn’t…
-
const URL = <request url> const OPTIONS = { val1 : “test” } $dropdown = $(“#dropdown”); $.getJSON(URL,OPTIONS).done(function (data) { $.map(data, function (val,index) { $dropdown.append($(‘<option>’, { value: val.id, text: val.text })); }); $dropdown.val($promoter.find(‘option:eq(0)’).val()).trigger(“change”); }); If you have any problem implementing this. Let me know in the comments. Cheers & Happy coding.
-
It is tedious to use arrow keys to move cursor in/our from parenthesis always. you can add a custom key binding for that task. Go to preferences > key bindings and add following code { “keys”: [“ctrl+enter”], “command”: “move”, “args”: {“by”: “subword_ends”, “forward”: true} } Of course you can use some other key instead “ctrl+enter”…
-
How to get all dates between two given dates in PHP ? Recently i needed date string array for a project i am working on. Let me show you how i implemented that. After some digging on PHP documentation. I found there’s a special PHP class DatePeriod that can be used to implement that. Photo by…
-
Feathericons is a simple open source icon library. by default icon size is 24px. You can use following simple html template on a blank page if you are starting from scratch. <!DOCTYPE html> <html lang=”en”> <title></title> <script src=”https://unpkg.com/feather-icons”></script> <body> <!– example icon –> <i data-feather=”circle”></i> <script> feather.replace() </script> </body> </html> Or you can install using…