Adding a missing function definition Using the VS Code Intelephense Extension. You get a squiggly line under a function you know exists. When you hover over it the popup says "Undefined function ... " Go to Preferences and Settings [ Ctrl + , ], search for stubs and...
Selected posts
Reverse Proxy Cups in Nginx
The process is similar to my previous post on proxying a sub directory back to the root. For example https://example.com/test => proxies back to / in the docker container upstream cups-endpoint { # in my case I'm using cups inside # a docker container and exposing #...
Adding custom values to Contact Form 7
https://www.wpguru.com.au/generate-dynamic-tag-contact-form-7/ From the above URL is this code. Just putting it here so I can find it again <?php add_action('wpcf7_init', 'custom_code_generator'); function custom_code_generator(){ wpcf7_add_form_tag('coupon_code',...
The REST API encountered an error
The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages. The REST API request failed due to an error.Error: cURL error 28: Operation...
Switching PHP version on MacOS with brew
Writing a web application and using the some new bells and whistles in PHP such as $var = $var ?? $othervar; only supported in 7.4 php -v # php7.3 brew unlink php@7.3 brew install php@7.4
Advanced git
https://youtu.be/duqBHik7nRo Just putting this here for later. A git talk that covers everything that I wonder about with git. Also the speaker has a book which going by her previous courses will be excellent.
Use FORCE INDEX
Just putting this here as I have a SELECT in MySQL that was taking 1.946 sec to return 20 records from a table with 159884 records when using a ORDER BY DESC on a DATETIME field Creating an index and changing the FROM to FORCE INDEX () dropped it down to 0.00079 sec /...
Format validationsErrors
A recursive function that takes a validation error array and return a string with all the different errors concatenated into a formatted string Further to my previous posting https://toggen.com.au/it-tips/cakephp-2-displaying-validation-errors This function will walk...
pgAdmin / pgcli could not send data to server: Socket is not connected
My setup is My home network is IPv6 enabled. I have an AAAA record specifying the IPv6 address of the Amazon EC2 instances Elastic IP <IPv6 enabled home network> | <internet> | <Dockerized Postgres on EC2 Instance> Getting this error message when attempting...
MacOS Scanning – Now working with IPv6
I had problems printing and scanning from my MacOS laptop to a HP Officejet Pro 8620. I ended up fixing it by turning off IPv6 on the printer and the MacBook. But it appears that you can have IPv6 turned on and it still work. Please see below...