Why does APT not use HTTPS?

In the ever changing world of technology, people often rush to get the latest. Hype for new features, improved performance and security is everywhere, and anybody rarely stops to think about things in depth.

Use the best tool for the job, they say. And the latest is always the best.

In that, I found it surprising that APT (advanced packaging tool) used for a variety of popular Linux distributions, such as Debian, does not use HTTPS, no matter how much people push for it. For all the arguments of HTTP/2 performance and Let’s Encrypt free certificates, APT developers have their own counterarguments.

Why does APT not use HTTPS?” is a simple website that explains the reasons behind that decision. And they kind of make a lot of sense for their particular use case.

SpaceVim – extended Vim configuration bundle

There are many different configuration bundles for Vim, which easy the discovery, installation, configuration, and documentation of different plugins and features of this powerful text editor. SpaceVim is yet another one of these.

If you are new to Vim, or have grown tired of trying to tweak it to your liking, please give it a try. It might just work for all your needs.

fx – command-line tool and terminal JSON viewer

fx is yet another command-line tool for working with JSON data. Some of the supported features:

  • Formatting and highlighting
  • Standalone binary
  • Interactive mode 
  • Themes support

This looks like a good alternative or a complimenting tool for both jq and jo.

Vim: persistent undo

Learning Vim is an endless process. Even after using it for two decades I still keep discovering new settings, features, and plugins that significantly improve my productivity.

The other day I came across “Ask HN: Best things in your bash_profile/aliases?” thread, with plenty of tips and tricks. One particular comment highlighted a feature that I kind of heard about but never got to setting up – persistent undo.

It turns out that starting with Vim 7.3 you can preserve the undo history between editing sessions. Which means that you make changes to a file, save it, close it, and when you reopen it later, you can press ‘u’ to undo the changes you’ve done during the last edit.

In order to set this up, you first need to create a folder, where Vim will store the undo history files. For example:

$ mkdir ~/.vim/undodir

Then, you need tell Vim that you want to use persistent undo and where to store the files. Edit the .vimrc file and add the following:

set undofile
set undodir=~/.vim/undodir

As long as you are using Vim 7.3 or newer and the directory exists, your persistent undo history will work like a charm.

Read the rest of the thread for more tips on how to clean it up periodically, and how to further improve your experience with Vim’s undo, using plugins that help navigate the undo tree.

GraphViz dot: Format: “png” not recognized.

As I’ve mentioned many times, I’m a huge fan of GraphViz software suite in general, and the dot tool in particular. It’s super handy for generating graphs and diagrams out of plain text files.

Today though I came across a problem that I haven’t seen before. While trying to generate an updated PNG graph from a dot file that used to work just fine before, I got the following:

$ dot -Tpng source.dot -o destination.png 
Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pic plain plain-ext pov ps ps2 svg svgz tk vdx vml vmlz xdot xdot1.2 xdot1.4 xdot_json

That looks weird. I tried the same with a few other formats and none of them were working. A quick Google search around found the solution over at StackOverflow. All I had to do was:

$ sudo dot -c

After that, dot started working as always.