Software

How to trim data in column with sql

To trim newline characters from a text field in SQL database, you can use the trim() function along with the replace() function. Here’s how you can do it:

UPDATE your_table
SET your_column = trim(replace(replace(your_column, char(10), ''), char(13), ''))

This SQL statement does the following:

replace(your_column, char(10), '') removes line feeds (LF, \n)

replace(..., char(13), '') removes carriage returns (CR, \r)

trim(...) removes any leading or trailing whitespace

This approach handles both Unix-style (LF) and Windows-style (CR+LF) line endings.

Clearing up git submodules problems

Clearing up git submodules problems

As some of you noted, I moved my blog into Hugo . You have to pull multiple git repositories to compile the entire project during the build process. Because begging is always challenging, it’s always trial and error, and I ended up having many sub-repositories missing. I’m now going to show the whole journey how to solve “the issue”.

How to force clean cached DNS records

links to clear cached records in popular public DNS servers:

Dealing with DNS changes can be annoying and frustrating. Changes are not visible straight away, you have to wait to see them. Thet are not even. Here you can find links to clear cached records in popular public DNS servers:

Flushing DNS cache

Checking results

You can check results here:

DNSSEC Tools

Why VIPS and Go it’s not a good match for production environment

Why VIPS and Go it’s not a good match for production environment

using cgo bindings in go is a not an easy way

I built a simple worker to do some magic with images by using Go & VIPS . I chose VIPS because it is blazing fast compared to other Go image processing libraries. So this is the story about what went wrong.

Because my DEV setup is Apple MacBook Pro with M1 Apple Silicon, it’s always tricky to compile something to the proper architecture. Installing VIPS on my machine, it’s pretty straightforward:

brew install vips