Sometimes Excel cells show a partial or masked value instead of the desired value.Double clicking the cell usually fixes the issue for the cell and
Read moreJavaScript function scope – going Global
In JavaScript, as in many other programming languages, variables have a scope – global or local / block. Functions also have a scope, if they
Read moreEmails are not sent or do not arrive from online forms – PHP / WordPress
If you are using a cPanel based hosting account and suddenly your website stopped delivering emails from form submissions or the PHP “mail” function, open
Read moreVS Code finding/highlight matching tag
To highlight the entire tag’s block, locate cursor on opening or closing tag and press CTRL+Shift+. To find matching opening/closing tag, first declare it by
Read moreChrome freezes or hangs in Android
A simple fix for chrome freezing (hanging) and not responding for a few seconds on an Android phone (Xiaomi or other brands): Open chrome Type
Read moreShow WordPress template file in footer
Tracing the template file used by WordPress might be tricky at times.The code below print the full path and name of the template file used
Read moreLoading Google Analytics in external js file
Here is a great way to load analytics via an external js file: (I created a function, but you can also run it directly)
Read moreAdjusting PHP pages to work with full caching
Caching web pages speeds-up dramatically the loading time. A ready, waiting cached version is served, no load on the server, no preparation, here it is!
Read moreBasic multiple cursors / multi line editing in VS code tips
ALT + mouse click adds an additional cursor in that position. When you select text in VS code it highlights all occurrences of the same
Read moreFixing Alexa skill regional restrictions
Suddenly, after years of usage, Alexa stops playing music from Spotify. Strange, but ok. a simple case of resetting the setup? No..Trying to disable the
Read moreDrupal ubercart log shows “cURL error: Peer’s certificate issuer has been marked as not trusted by the user.” after installing wildcard SSL certificate
Recently our shopping cart (Ubercart under Drupal) stopped finalizing transactions. The orders got up to the review step, but then, instead of completing the order,
Read moreRedirect all links under sub-folder to sub-domain
Recently we moved our WordPress blog from residing under a sub-folder (mysite.com/blog/) to its own sub-domain (blog.mysite.com). Although in various articles this move is not
Read moreDrupal 7 feed import incomplete or too slow
In our setup SAP exports a daily price and stock file for our website. The file is uploaded in a script via FTP to the
Read moreExcel: splitting delimited cell data into new multiple rows with all other columns data duplicated
Recently I had a need to export content from one system and import into another. The exported data included a cell with multiple values delimited/separated
Read moreWordPress – change previous next post links to post titles
The default WordPress setup on a post page is to link to the previous and next posts with the “previous” and “next” buttons. But what
Read moreThe quickest way on the road to become GDPR compliant – disabling google analytics with one JavaScript line
Well, I’m not going to write the full guide to GDPR compliance yet, but pay attention to this mind blowing discovery: Google provides a way
Read moreRegex find and replace phrase starting with X and ending with Y
I needed to remove many lines from my sitemap.xml file which Google search console didn’t crawl correctly (reported as soft 404). The lines to remove
Read moreRemoving second English keyboard in Windows 10
It already happened more than once. Windows 10 updates and I find myself switching languages from English (united States) to English (my country) to my
Read moreExcel – Select and copy only filtered rows
If you have an excel with many rows and you have applied filters or even only hidden some rows you can easily select and copy
Read moreContact form 7 get value before pipe (_raw_ value equivalent)
On one of our WordPress sites we used the excellent contact form 7 plugin. The plugin allows you to easily create forms for your site.
Read moreChanging the address bar color in mobile browsers
Add the following to the head section of your HTML:
1 |
<meta name="theme-color" content="#ff6600" /> |
Read more
Getting an entire HTML code of an element using element’s ID and outerHTML property
I needed a way to send an email to my site’s visitors with info already generated on screen. In my case it was a dynamically
Read moreForce download of files with specific extensions
On one of my websites I listed product drawings for customers to download. These drawings were offered in different formats: PDF, Solidworks, Parasolid, DXF and
Read moreSetting up a cron job in
Linux command line
Cron is used to schedule tasks to run at specific intervals (minutes, hours, days, months…). Use SSH to access your server’s command line. Type:
1 |
crontab -l |
Running the Drupal cron job and flushing cache from the Linux cron
Working with Drupal 7 our default initial setup was running Drupal’s cron using the build-in cron mechanism (poorman’s cron). There are several downsides to this,
Read moreFinding the final url of a redirect
In one of my websites there was a complicated mechanism for redirecting mobile users from desktop pages to their mobile versions. When I needed to
Read moreAdding a rel=”alternate” link in Drupal 7
When your site is not responsive, but serves a mobile version instead of the desktop one, it is recommended to add a rel=”alternate” link to the
Read moreTracking protection and JavaScript errors
A few days ago I noticed redirect issues on one of our websites. Instead of opening a new window with a download form (with window.open
Read moreRemove parameters from url in PHP
In case you have a url and you want to remove all parameters from it use this:
1 2 |
$str = 'http://www.example.com/page.php?a=123&b=567'; $strClean = preg_replace ('/\?.+$/', '', $str); |
This regex directive means – replace everything
Read moreGet current’s page full URL – works with clean urls
Here is the simplest way to get the current’s page full URL even when using clean urls (the address in the browsers line is different
Read more