OwnBlog from DimiG

Software Engineer / Technical Director

Robust File Copy for Windows

Recently I had a problem with the file media server when one of the disk in disk array is down. In this case every server degrade the own disk speed, cause it has to recover the data from the broken one. The problem was that I have thousands of important files (>1Gb) there which I can’t allow to lose. Disk rebuild is risky cause if during rebuild process the second hard drive down - you may lose your data very easy. The server and clients working on Windows platform. If I start save material to the local hard drives by Windows copy I get Windows error, cause transmission interrupted by server frequently. Other side I want to be sure that my local copy reflect the files location on the server.

I remembered that there is a good program for such purposes on every Windows system which calls Robocopy. It saved my days.

Emacs strip CR(^M)

Time to time I use the great old text editor Emacs. In spite of advanced age this reliable text editor competes with modern text editors and even some IDEs. If you work with text files on different platforms you may encounter with CR(^M) symbols on every line. This happen If you have a mix of lines that ends with ^M and lines that don’t.

Also if you see ^M in your file, you may have opened a file with DOS-style line endings (carriage return + line feed) while Emacs assumes it has Unix-style line endings (line feed only). (The carriage-return character, sometimes abbreviated as CR, is ^M. The line-feed character, sometimes abbreviated as LF, is ^J)

Golang under Cygwin

The current article I have to write by two reasons. First - the Go language developed by Google becoming popular little by little. Second - there is NO accurate information about how to setup Go under Cygwin.

Go also commonly referred to as Golang, is a open source programming language developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. Designed primarily for systems programming, it is a compiled, statically typed language in the tradition of C and C++, with garbage collection, various safety features and CSP-style concurrent programming features added.”

UNIX pass under Cygwin

For any IT system administrators and specialists there is a headache to remember a lot of working passwords in daily work. As you probably know is safe to use the different ones for better security. There are many password managers which collect and encrypt your passwords locally or remotely. The best way if your password manager is simple and follow the Unix philosophy. With pass, each password lives inside of a GNU Privacy Guard (GnuPG, GPG) encrypted file whose file name is the title of the website or resource that requires the password.

PostgreSQL under Cygwin

As I wrote below I use Cygwin with Windows platform to achieve the Busi-do 😏. Yeah, I’m not looking for easy ways, really. To use the Cygwin is not easy way, but it really works for many tasks. If you work with databases there are two ways. First is to setup database directly into the Windows, the second is setup database into the Cygwin. The first way is easiest one, but may NOT working if you develop inside Cygwin.