How to change Windows/DOS line breaks to Unix style with Vi

I had a file that was edited in Windows, so it had CRLF line breaks. It was a script and I had to change the line breaks to LF before I could run the script in bash. I converted the line breaks to Unix style using the vi editor and…

How to verify if server supports TLS 1.2

I was implementing an Apple Pay functionality for a website and one of the requirements was that the server must support the Transport Layer Security (TLS) 1.2 protocol. There was an easy way to check that from MacOS command line. openssl s_client -connect example.com:443 -tls1_2 I got a certificate chain…

How to set a port number for Vapor server on localhost

Vapor defaults to port 8080 on localhost. I couldn’t use the 8080, since that was reserved for another server on my MacBook Pro. Here’s how I set a different port number from the command line. swift run Run –hostname localhost –port 9000 This works with Vapor Framework 3.0.8 and Toolbox…

Debugging Auto Layout: Unsatisfiable Contraints

When we work with auto layout we will hit an unsatisfiable constraint error at some point. The result is a view that looks somehow broken and there are a lot of text in the Xcode’s debugger window. The unsatisfiable constraint error means that there are some conflicting constraints and the…

How to keep your client happy in a software project?

The title could be also “How to record the progress of a project and keep your client on the same page with you when a project moves fast forward?”. One of the key documents in my client communication is a changelog. It’s perhaps the most important technical documentation, since it…