Refer: https://stackoverflow.com/questions/50042278/visual-studio-code-remove-blank-lines-from-code
Use regular expressions to delete, double-blank lines. [Ctrl]+[H]
Replace this:
^$\n\n
With this:
\n

Technical notes, and other ideas.
Refer: https://stackoverflow.com/questions/50042278/visual-studio-code-remove-blank-lines-from-code
Use regular expressions to delete, double-blank lines. [Ctrl]+[H]
Replace this:
^$\n\n
With this:
\n
Refer: https://askubuntu.com/questions/56683/where-is-the-cron-crontab-log
On a default installation the cron jobs get logged to
/var/log/syslog
You can see just cron jobs in that logfile by running
grep CRON /var/log/syslog
The above grep will return nohthing if your crontab has not been configured yet.
Refer: https://tecadmin.net/tutorial/bash-scripting/bash-debugging/
Example – Enable Debug in Script
You can enable debug mode by adding set -xv option inside a shell script. This is useful to enable debugging for some part of the script.
#!/bin/bash
set -xv # this line will enable debug
cd /var/log/
for i in "*.log"; do
du -sh $i
done
cat mobile_errors.txt.txt | grep -o -P '(?<=returned for booking ).*(?= with error code)' | sort | uniq > mobile_error_bookings.txt
The magic of this search is here:
grep -o -P '(?<=beginning string with space at end ).*(?= ending string with space at start of it)
Visual Studo Code Tricks
Remove Blank Lines
Search for:
^(?:[\t ]*(?:\r?\n|\r))+
Replace with NOTHING.
Refer: https://www.linuxshelltips.com/extract-email-addresses-from-text-file/
Input File: missing_pricing_emails.txt
Grab the email addresses
grep -oe "[a-zA-Z0-9._]\+@[a-zA-Z]\+\.[a-zA-Z]\+" missing_pricing_emails.txt | sort | uniq -c
Or count how many are there
grep -oe "[a-zA-Z0-9._]\+@[a-zA-Z]\+\.[a-zA-Z]\+" missing_pricing_emails.txt | sort | uniq -c | wc -l
G7020 printer issue - "The latest firmware is on the server. Install the firmware update" message
I see the constant message "The latest firmware is on the server. Install the firmware update" on the printer's screen. If I am pressing OK, the message is dissaperaing, but in an hour or two I can see it again. A cannot update firmware as official Canon servers do not contain any firmware versions
To update the firmware, please follow these steps:
Run a command through the Terminal app:
networksetup -setv6off Wi-Fi
networksetup -setv6off Ethernet
To re-enable IPv6, you need to replace setv6off to setv6automatic for Wi-Fi or Ethernet:
networksetup -setv6automatic Wi-Fi
networksetup -setv6automatic Ethernet
In order to make make Cisco AnyConnect work faster on VPN for Firefox, disable IPv6.
about:config
network.dns.disableIPv6: true
See instructions: Password Reset on Office Nov2022