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
URL encoding converts characters into a format that avoid getting in trouble if a parameter has for example & ampersant. This can happen with many other characters. BUT ! When you get a url parameter and you assume that it is url encoded, you take the value and do url decode. This will work. But … Continue reading Url encode can be confusing