Archive for 2017

Woes of moving to a more secure world

Sunday, June 11th, 2017

If you haven’t noticed, my blog is now secure from the NSA peeking at your comments by the magic of TLS and Lets Encrypt !

But doing this, I forgot to update WordPress’s notion of what URL this blog lives on, and as a result comments posting didn’t actually work.

Sorry about that, and now it should work fine,

Script Day: “secure” password generated one liner

Sunday, June 11th, 2017

Ever needed to create a “secure” password to register to a web site(1) 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

Monday, May 29th, 2017

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

Tuesday, April 18th, 2017

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:


Is Precise Canonical’s XP?

Wednesday, March 15th, 2017

Canonical, makers of the Ubuntu operating system, have just announced that their about to expire “long term support” version is getting a longer “security only” life extension.

Sounds familiar?

Like other vendors who have similarly offered such life extensions in the past, the new support contract will only be offered to corporations who subscribe to the pricey commercial support package (at $250/year per VM and $750/year per physical server).


The GitLab system crash and what can we learn from that

Wednesday, February 1st, 2017

Yesterday night, GitLab’s hosted service ( suffered a database crash and the service went down for a day(1).

I’m not going to discuss the technicalities of the down-time (which is covered extensively in the blog post linked above), except to note that “shit happens” – my main take-aways from that are basically two:

  1. Don’t let tired people handle critical system issues, and if you ever find yourself juggling the third production issue at midnight after a full day of work – just say: “no, I’m not going to fix this – some one else must step in or we leave the system down for tomorrow”.
  2. The GitLab process for handling the failure was nothing short of amazing, and they deserve all the kudus for that: After figuring out how deep in shit they are, and posting a “sorry we’re down” page on the main web site, they:

I think this should be the standard from now on how to handle system crashes on your public facing application – 1000% transparency should be how these things are handled if you have any hope of recovering the trust of the community in your service.

  1. at the time of writing, the service is still not up, but its not yet even 24 hours since the crash happened []

Polymer Runtime Application Configuration

Wednesday, January 18th, 2017

When creating web applications, we often need to have some parts of the application configuration for the deployment environment – usually web service API endpoints have different URLs in different environments, such as using a production web service in production and a locally hosted web service during development.

Such a feature is implemented in many web frameworks and building tools for web applications, such as Gulp or Grunt. Unfortunately, when building applications using Google’s Polymer SDK, there are no such features available – reviewing the Polymer documentation one, there isn’t even any mention of how one handles such mundane tasks as configuring API URLs, except hard-coding them(1).

Developers have tried to solve this problem in different ways, from adding “environments” feature for Polymer’s internal build tool; abusing “behavior modules”; or using “app globals” custom element with complex code to share application-level state. None of these features work well or elegantly (except maybe the environments feature, if it ever gets implemented).

Here is the solution I came up with – with many thanks to Daniel Tse that described part of the implementation in this article – just using the core Polymer elements iron-ajax and iron-meta and without any custom code. Its not the most elegant thing that can be done, but it is relatively simple and works well. Its main down-side is that the application configuration is not embedded in the application during build time but loaded from an external file when the application loads – this may even be a required feature in some scenarios but its not the generally accepted practice.


  1. all iron-ajax examples, as an obvious example, use hard-coded URLs []

מתכון: קציצות עוף וסלרי ברוטב סלרי חמצמץ

Friday, January 13th, 2017

מסתבר שאין לי פה מתכון לקציצות עוף, סוג של קציצות שאני די מחבב, אז הנה משהו שערבבתי לי לאחרונה. הרוטב היא קצת חמוץ וכדי לאזן את זה – גם קצת מתוק, אז תשימו לב. בנוסף הכמויות הן לדי הרבה אוכל – אני מכין בד”כ לשלושה אנשים ואוהב שנשאר לקחת לארוחת צהריים במשרד, אז קחו את זה בחשבון.


Spam prevention powered by Akismet