Author: Junaid

  • Quick Twig Template Rendering Without Much Set Up

    Sometimes, I want to prepare more readable output from my PHP scripts. It is good to create a template and render with values from script out put. Here is a quick way to render a twig template. First lets assume the HTML twig template (test-report.html.twig) is: Then we have this script, test-script.php: Keeping above two […]

  • Turn ON Android Mobile Having Broken Power Button

    Power button of my mobile phone stopped working completely few weeks back. It showed some symptoms few days prior to that. I was being so careful not to drain out the battery as I would be required to press button to turn it back to ON, which I can’t because of broken button. But it […]

  • Fertilizer Recommendations

    In this article I just note applications of various fertilizers. It is mainly to help myself to refer quickly as I can look into this article as needed. I may update this article as need to add or update info. Solution Preparation We need to mix 10 gram of fertilizer with 1 kg of water […]

  • Install MySQL 5.7 on Ubuntu 20.04

    First follow installation instructions given at . Then make sure docker is running properly: Ensure it created the image by: Now, install docker MySQL 5.7 image and create a volume for storing data. Make a MySQL installation with command: Replace the password with your one. To show running instances: Login to docker instance terminal: […]

  • Building Wheel for a Python Package Failed

    Today I was trying to install frappe-bench package within a newly created python 3 virtual environment in my Ubuntu 20.04. It gave this error in terminal. However, the package appeared to be installed even with above error. Then I got this SO thread in my search It has this answer from a pip maintainer […]

  • Use Python Markdown Extension in Jupyter Notebooks

    I regularly use Python Markdown when working with Jupyter notebooks. It is actually straightforward to set up in Jupyter, but I always forget the exact steps to be followed whenever I set up Jupyter notebook especially after installing a new OS. So, there are those steps, I note here to help myself in future. First […]

  • Get MP4 from MKV and Extract Subtitle(s)

    This command helped me to get MP4 file from MKV file: This command will help to extract subtitle from MKV file. The above command will extract first subtitle. MKV file contains more than one subtitle track and if you want to extract one of them. Then you can replace “0:s:0” with “0:s:1” to extract second […]

  • 3.7 to 1.5 V Buck Converter with MC34063AP

    My daughter got a toy train which uses AA sized battery cells to operate. It has space to put two AA cells in parallel, so it requires just 1.5 V to work. To avoid buying AA cells, I tried to make it rechargeable with a 18650 lithium-ion cell with protection board having USB port. But […]

  • Create PDF from Image Files and Resize PDF to Standard Page Size

    First convert image files to PDF with command: Then resize PDF to standard size with command: Read more about pdfjam at here.