Node-RED and Amazon Echo skill

June 19th, 2019

borg backup software

June 18th, 2019

For some time, I had used attic for my linux backup software. I needed to check the contents of some backup files as well as migrate to new servers. During this, I ran into numerous issues with getting attic installed as well as restoring from the old attic backups. Consequently, I looked around and found borg backup software which is a (currently maintained) fork of attic and installed/compiled with no issues.  Additionally, borg had borgmatic (automated backups) and allows mounting as a FUSE filesystem. 

Additional borg links:

borgmatic
borgmatic config examples
borg FAQ
borg mount

Fix for slow Cygwin

June 18th, 2019

On my work PC, Cygwin was taking a significant time (minutes) to start programs. The fix for me was to ensure the cygserver process was running.

Replace strings in SQL

June 18th, 2019

On occasion, I need to replace strings in entire database columns. 

Here is how to do it in MySQL (reference link1 link2):

UPDATE
    table_name
SET
    column_name = REPLACE(column_name, 'text to find', 'text to replace with')
WHERE
    column_name LIKE '%text to find%';

Here is how to do it in SQL Server (reference link):

update my_table
set path = replace(path, 'oldstring', 'newstring')

 

vi paste contents of another file in current file

June 18th, 2019

While editing a file in vi, in order to paste the contents of another file at the current location type:

:r filename_to_paste