After trying ChatGPT for a while, I thought, if I try to see what code he proposes for one of my posts. Normally, my post contains small pieces of code as an example. What differences will there be between the code that I wrote and the code that ChatGPT proposes to me. First try the … Continue reading ChatGPT content policy violation asking for a simple code snippet
For this example, we are going to log into a Django application. If it is another type of application, you only have to check the necessary login form fields.
Usually, we have a git repositori setup in a test server where we execute a git pull every time we want to deploy code changes to the this server. We want to automate "git pull" and many other task in every commit to our git server branch (master), using gitlab devops. We have created a … Continue reading The most simple gitlab-ci file to deploy your commits – Devops
They are the same, but differ just in one thing....
Sometimes you want to remove some metabox of the edit page. Place the following code into you functions.php file.
If you try to open and write a .xlsm file using PhpSpreadsheet o PHPExcel, you might drop functionality present in the original xlsm file because .xlsm files are not (fully) supported. So, there is no xlsm library in PHP. In Python you can use openpyxl to read/write data but if you use an exsiting xlsm … Continue reading Use xlsm macro excel from PHP
It is useful for example in Batch processes, from non Java programming languages like Php, Shell scripts, etc... You can find it in Github BatchPDFSign is a command line to sign PDF file with a PKCS12 certificate. You need a PKCS12 certificate. It should be a .pfx file. You need a password for the .pfx … Continue reading Command line tool for digital signature of PDF files
If you want to have your Django app in a domain folder like this https://mydomain.com/myfoldername Here you have the code to place in urls.py file :
WordPress is great as a content manager, but when you want to publish that content, the performance and other requirements can make it advisable to use another publishing environment. For example, you can use Django and the wordpress JSON API. In these cases you may be interested in redirecting calls to the public part of … Continue reading How to redirect WordPress public site to any url
I think it should be disabled to not logged in users by default. Anyway, here you have the code to place in functions.php : JSON Rest is enabled public by default, and it's used by V5 new WP editor. You can disable it and install the Classic Editor Plugin and disable API for non locahost. … Continue reading How to disable WordPress REST API to not logged in user without a plugin