Zoho Deluge - Regex to Strip all non-numeric characters
- Category: Zoho
- Hits: 15443
A quick post on how I managed to build a regex to extract all non-numeric characters (all non-digits) from a string.
Why?
I only want the digits/numbers from a string:
v_PaymentTerms = "Credit Note - 30 Days"; // we want the 30 from the above string
How?
Minimal Privileges for MySQL Database Backup Cron Job
- Category: cPanel
- Hits: 12823
A quick note as I had difficulty finding a clear answer on this. I need a cron job setup where the permissions for a database user is required to do a backup (reading and copying data from a LIVE database) to a copy of the database (inaccessible via other users).
How?
I want to list 2 methods here. One to create a .sql file of the backup but another to copy the contents to a copy of the database accessible only by root and and this database "backuper" user. For both methods, I grant the following to the user doing the backup on the database I want a backup of:
GRANT SELECT, LOCK TABLES, EVENT, INDEX, REFERENCES, TRIGGER, SHOW VIEW ON 'my_live_db'.* TO 'mybackupuser'@'localhost' IDENTIFIED BY 'mybackupuser';
CSS Printing - Page Break Inside with Headers and Footers
- Category: Cascading Stylesheets
- Hits: 12337
I saw a lot of articles that would cover this but I wanted an example which includes headers and footers and how to get an automatic page-break-inside to not overlap these. Fine on screen but this is obviously for when it comes to printing.
Why?
I needed to create a template in HTML where the first page is a cover page (background image filling the page with a logo floating at the centre) and the next page has a table which is of variable length. Fine when the table was short and didn't have many rows. But the client will pick up the phone to you when the table has too many rows to fit on one page, and this overlaps onto the next, covering the footer and header...
How?
By spending a lot of time spinning on my chair and twiddling my thumbs...
Zoho Templates - Font size is inexplicably tiny
- Category: Zoho
- Hits: 19715
This is an article resolving an issue where a template will shrink all the text when in PDF preview.
Why?
Ok doesn't need a song and dance about it, but I went home yesterday downtrodden by an issue which I'd been working on for most of the day where I would remove all the styling and the text would still appear small. Sure I resized the text to about 46pt and everything was over 3000px in width but this is not good for a final solution. I thought maybe there was a setting for the default font size or where I've accidentally zoomed out in the browser... but these were red herrings as I have other templates that work fine.
How?
The error is one of those that you wouldn't consider relevant in this case, after all, all styling was removed... Here are two screenshots to demonstrate the issue:
Zoho Deluge - Update Creator from CRM
- Category: Zoho
- Hits: 19503
This is an article documenting how to update Creator from a workflow written in a Deluge Script held in ZohoCRM.
Why?
I've also started this article to document an issue we encountered where our code was as per the documentation provided, and the responses returned as successful, but the target fields did not update. This was as a result after changing the owner of the Creator app to another person and adding our previous Super Admin account as a "Developer".
How?
I'm going to demo two methods here using the <connection_link>
Excel - Check a column for values found in another column
- Category: Excel
- Hits: 14953
This is an article to remind me how to search a column in an Excel file for values found in another column (in this example, on another worksheet in the same workbook).
How?
So for demonstration purposes, I'm using a new Excel file with two worksheets called "Sheet1" and "Sheet2" respectively.
MS Excel - Split Workbook into separate files per sheet
- Category: Excel
- Hits: 19808
This article serves to explain how to split a spreadsheet consisting of multiple sheets into separate files per sheet.
Why?
The Excel file in question was about 36000 rows and had a file size of about 11Mb. In order for an import process to work, the import would only accept XLS files no greater than 1Mb. So our script has to split a single spreadsheet into multiple worksheets of 3000 rows each, and then output each sheet to a separate file that is formatted as XLS (Not *.xlsx).
How?
In summary, we are going to move the Excel file to a folder of its own. We're going to run two VBScripts in two stages, firstly to split the specified rows into sheets, then each sheet into a file each. And we want all the files generated to be created in the same folder.
Google Drive API v3 - OAuth2 using Service Account in PHP/JWT
- Category: Google
- Hits: 46978
This is an article explaining the code needed to write a PHP script which generates an access token for a service account which in turn is used to list files in a team's Google Drive.
This is very different to my code for OAuth when attended: Google Authentication - OAuth 2.0 using PHP/cURL... In that this one doesn't prompt for a user. Again this script doesn't need the client libraries, composer, vendor, etc.
Why?
This took me the best part of a month to get working. It is taken from Google's documentation as well as other forums and websites that try to explain it. Do not waste your time like I did on the public key, verifying a JWT signature, or including any third-party libraries. You can do it in pure PHP and all you need is the JSON key that you generated in your Google console.
Applies to:
- Google Drive REST API v3
- Google OAuth 2.0 v4
- Google Cloud Platform IAM
- Google Suite
- PHP v5.6.35
How?
I'm going to go through each section of the code to go through the logic and highlight any changes you may need to make.
Page 27 of 73
Credit where Credit is Due:
Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.
Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.
Thank you for visiting and, as always, we hope this website was of some use to you!
Kind Regards,
Joel Lipman
www.joellipman.com
Latest Articles
Accreditation



Donate & Support
If you like my content, and would like to support this sharing site, feel free to donate using a method below:

bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
0xb038962F3809b425D661EF5D22294Cf45E02FebF
Paypal:

Bitcoin:

Ethereum:
