Skip to main content

Posts

Showing posts from October, 2021

how to dynamically change favicon in dokuwiki argon template?

 Put <link href="lib/tpl/argon/apple-touch-icon.png?v=<?php echo rand() ?>"> and <link href="lib/tpl/argon/favicon.ico?v=<?php echo rand() ?>"> in if statement and <link href="lib/tpl/argon/images/apple-touch-icon.png?v=<?php echo rand() ?>"> and <link href="lib/tpl/argon/images/favicon.ico?v=<?php echo rand() ?>"> in else if statement. Note: the images should be in 48*48 size. Note: ?v=<?php echo rand() ?> is for busting the cache for favicon alone. Note: You should comment out this block of php code: echo tpl_favicon(array( 'favicon', 'mobile', ))

How to directly save ai(illustrator image) to large size png or jpg?

There is no need to convert ai file to psd in order to make png or jpg. Open the file in illustrator. Just click on an empty area on the canvas and press delete key in keyboard to delete the canvas(do ungroup of images if every images gets deleted). Delete all the images but the one we need. Then click "export as" png or jpg from file menu option. In the next screen, you can select the resolution. Below 300ppi, there is 'other'. Click it and enter 712ppi. Thus you will get large crystal clear image. Do this for all the images you need.

Steps for selenium testing with pytest, in windows 10 and windows 11

1) Download and Install python. (Don't forget to check the box next to "Add Python to PATH). Then click on "Install Now". After installation click on "Disable path length limit". Then click "close". 2) Install pip  Open command prompt and enter the following command: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py Press Enter. If you are in C:\Users\vipin> location in command prompt, then this file will be downloaded to that place. Cut and paste the get-pip.py file to the python directory(C:\Users\vipin\AppData\Local\Programs\Python\Python310\). Change the current path of the directory in the command line, to the path of the directory where the above file exists. This is done by executing the following command in the command prompt : cd /users/vipin/appdata/local/programs/python/python310 Press Enter. Run the command given below: python get-pip.py Press Enter. and wait through the installation process. 3) Install pytest pip install -U p...