10 things to avoid in Docker containers

10 things to avoid in Docker containers provides a handy reminder of what NOT to do when building Docker containers.  Read the full article for details and explanations.  For a brief summary, here are the 10 things:

  1. Don’t store data in containers
  2. Don’t ship your application in two pieces
  3. Don’t create large images
  4. Don’t use a single layer image
  5. Don’t create images from running containers
  6. Don’t use only the “latest” tag
  7. Don’t run more than one process in a single container
  8. Don’t store credentials in the image. Use environment variables
  9. Don’t run processes as a root user
  10. Don’t rely on IP addresses

Parsing text printouts within Ansible playbooks

I’m sure this will come handy soon, and I’ll be spending too much time trying to figure it out without this article: Parsing text printouts within Ansible playbooks.

It’s not every day that you see regular expression examples in the Ansible playbooks…

Block unwanted advertisements with /etc/hosts file on Linux

Back in the old days, before the browsers even had extensions like Adblock Plus, many of us – tech-savvy web surfers – used to block unwanted advertising, SPAM sites, and other non-sense using the /etc/hosts file.  The technology behind is very simple – you overwrite the IP address to which the unwanted website’s domain name resolves with a loopback IP address (127.0.0.1).  Whether you do it on your own machine or at a home/office proxy server is irrelevant.  And it worked magic!

Turns out, people still use this technique today.   I came across this article, which shows how to use a rather extensive list of domains for all sorts of online madness, collected and maintained by kind folks at http://winhelp2002.mvps.org/.

I tried it out of pure curiosity and sure enough it does what it says.  I’ve reverted back to Adblock Plus a couple of days later though, as random sites were breaking here and there.  I think this might be related to different adblock-detectors that many sites employ these days.  Also, some of the ads use things like embedded scripts or buttons, which might render JavaScript errors, preventing the rest of the page from loading.

But if you’ve never tried it, I strongly recommend giving it a go.

SC-IM – Spreadsheet Calculator Improvised

Here is an interesting project – SC-IM, or Spreadsheet Calculator Improvised, which is an ncurses spreadsheet program for terminal.  Here are some of the features:

  • UNDO / REDO.
  • 65.536 rows and 702 columns supported. (The number of rows can be expanded to 1.048.576 if wished).
  • CSV / TAB delimited file import and export.
  • XLS / XLSX file import.
  • Key-mappings.
  • Sort of rows.
  • Filter of rows.
  • Cell shifting.
  • 256 color support – screen colors can be customized by user, even at runtime.
  • Colorize cells or give them format such as bold or underline.
  • Wide character support. The following alphabets are supported: English, Spanish, French, Italian, German, Portuguese, Russian, Ukrainian, Greek, Turkish, Czech, Japanese, Chinese.
  • Implement external functions in the language you prefer and use them in SC-IM.
  • Use SC-IM as a non-interactive calculator, reading its input from a external script.
  • More movements commands implemented !
  • Input and Output was completely rewritten.

A combination of interactive and non-interactive interface seems to be particularly useful.

GPL defense issues

A friend sent me a link to this email from Linus Torvalds to the Kernel Summit Discussion mailing list.  The subject of the conversation is the General Public License (GPL) and whether or not it should be enforced in courts.  Read the whole thing – it’s quite interesting.  Here are a few snippets just to get you started:

Let’s be clear about this: lawsuits destroy. They don’t “protect”.

Lawsuits destroy community. They destroy trust. They would destroy all the goodwill we’ve built up over the years by being nice.

And then this:

Because lawsuits – and even threats of lawsuits – makes companies way less likely to see you as a good guy. Even when you’re threatening
somebody else, everybody else around the target starts getting really
really antsy.

I talked to an Oracle lawyer a few months ago, and told him their
lawsuit just makes Oracle look bad. The lawyer was dismissive, and
tried to explain how it’s silly how people take lawsuits personally,
and talked about how layers _understand_ that lawsuits aren’t
personal, and that they are still friends outside the court.

I’m sure a lawyer can “understand” how lawsuits aren’t actually
something personal at all, but lawyers really seem to be the *only*
people who “understand” that.

The fact is, lawsuits (and threats of lawsuits) do not make for
friends. You just look like a bully.