Archive for the ‘Software’ Category

Why Are Linux Software Distributions Methods Are So Different?

Don’t do this:

Do this:


The API wars… who actually cares?

This is a public response to Johan Thelin’s post “The API wars – 16 years later. His blog commenting system looks a bit broken and regardless – I think its an important enough discussion to publish here. The main premise of the article is that the web APIs have won the “API war” in the context of Joel’s Spolsky’s “How Microsoft lost the API war” article from 2014 but the main winner is the globally domineering Google and we should subvert their victory by moving to the new runtime – the WebAssembly, that is better in every way.

Here’s what I had to say about that:


Why Konsole is the best terminal emulator

I often say that one of the main reasons I use KDE Plasma as my default graphical workspace is that some of the KDE specific software is the best at what it does, and specifically – as a lot of my computer time is spent using a console – the KDE terminal emulator software Konsole is the best in the world.


Script day – different default browser per KDE activity

This is a bit of a weird script day – the script is pretty simple but the integration is interesting. I’m scratching my own itch here and also demonstrating how to:

  • Use dbus-monitor to listen to D-Bus events
  • Use SystemD user services to run a session service
  • Update KDE configuration safely from scripts


Best April Fools Joke

That I’ve seen in a while anyway. If you go to Stack Overflow today, you’d find a helpful rubber duck in the corner that will help you solve all of your (code) problems:


Java’s CompletableFuture and typed exception handling

With version 8, Java finally jumped on the asynchronous programming bandwagon with its own Promise-Oriented programming model, implemented by the CompletableFuture class and a set of interfaces and implementations it uses. The model is generally useful and not as horribly complicated as we sometimes get in the Java foundation class library1, and it lends itself to fluent programming much better than the comparable model from fluent API proponent Vert.x project.

The Problem

One thing that most asynchronous computing models suffer from – and Java’s CompletableFuture is no exception – is the loss of typed exception handling. While CompletableFuture.exceptionally() is a good model that does not introduce a lot of boilerplate2, you do lose the ability of the try..catch..finally syntax to effortlessly ignore exceptions you are not ready to handle and just letting them propagate up the stack. (more…)

  1. especially for things that claim to be “enterprise versions”, aughh []
  2. again, compare to Vert.x AsyncResult handlers. Other APIs, such as RX also do a good job in reducing boilerplate around error handling []

Hosting Polymer applications on Amazon S3 with proper URLs

In case you’re looking to host a Polymer application, S3 is a great and cheap option. The main problem is with no rewrite rules, you must use hash tag routing.

But with a simple configuration hack and a Cloudfront distribution you can use proper URLs for your S3 hosted polymer application – as detailed by Keita Kobayashi in his blog.

Script Day: “secure” password generated one liner

Ever needed to create a “secure” password to register to a web site1 and you couldn’t be bothered to invent a secure password? Just paste this command line to your terminal:

ruby -e 'puts [*"a".."z",*"A".."Z",*"0".."9",
  ].shuffle[0..(ARGV.shift.to_i)].join' 16

The last argument is the number of characters to put into the password.

  1. that probably annoyingly require “at least 1 upper case letter, 1 lower case letter, 1 number and 1 special character” []

Script Day: AWS CLI with multiple accounts with ease

Maybe you are a consultant and juggle multiple clients with Amazon Web Services deployments, maybe you just have accounts for all the start-ups you ever worked for, or maybe you just like to use 17 different AWS accounts for the free-tier usage, but eventually your ~/.aws/credentials file looks like an MS-Windows INI file.

At this point, running the AWS CLI is kind of annoying – you need to remember the correct --profile flag to set for each scenario, and bash will not complete these for you…

Bash aliases to the rescue!


SSH-over-HTTPS for fame & profit

In the past, I’ve discussed using SSH to circumvent restricted networks with censoring transparent proxies, but that relied on the restricted network allowing free SSH access on port 22 (what we call in the industry – the single network requirement for getting work done).

Unfortunately, there are restricted networks that don’t even allow that – all you get is the transparent censoring HTTP proxy (which has recently became the case with the free Wi-Fi on the Israeil Railways trains).

But fortunately for us, there is still one protocol which they can’t block, they can’t proxy and they can’t man-in-the-middle  – or else they’d break the internet even for people who only read news, search google and watch YouTube – that is HTTPS.

In this article I’ll cover running SSH-over-HTTPS using ProxyTunnel and Apache. The main consideration is that the target web server is also running some other websites that we can’t interrupt. The main content is based on this article by Mark S. Kolich, but since it only covers using plain HTTP and in addition to some simple changes in the example configurations I also wanted to cover getting an SSL certificate, here’s my version of the tutorial:


Spam prevention powered by Akismet