It's that time of the year again: spring means Kubecon! AWS Container Days Before the main Kubecon started, I attended the AWS Container Days event, live-streamed on Twitch (hip!). Being AWS, of course it was highly EKS-centric, and very interesting. AWS is working on their own container-centric linux distribution, called Bottlerocket. It sounds like a spiritual successor to CoreOS (my words, not…
I recently set up the kube-prometheus-stack Helm chart (formerly known as prometheus-operator) on our Kubernetes clusters as $dayjob. This chart sets up a full monitoring and alerting stack, with Prometheus for metrics collection & retention, Grafana for visualisation, and AlertManager for, well, managing alerts (!). The out-of-the-box monitoring is awesome: extremely detailed, with a wealth of…
Last week saw KubeCon + CloudNativeCon Europe 2020 taking place fully remotely, rather than in-person in sunny Amsterdam. Here are my notes from the conference, and links to talks that I thought were worth mentioning! Of course, I didn't attend all the talks, so this isn't an exhaustive list – here is the full schedule. I've linked to the presentations on sched, and they should all be posted to…
Developers are spoiled. Every single package management system these days will allow a developer to define their project's dependencies in a simple format, whether that's a cargo.toml in Rust, Gemfile for Ruby apps, a pom.xml for Maven-based projects, package.json for NodeJS, composer.json in PHP… Declaring your dependencies and their desired version in a standard, easily-parseable language…
HTTP compression is ubiquitous on the modern web as a way to trade a small amount of computing power in exchange for vastly reduced bandwidth. It is usually achieved with the gzip algorithm, so I'll refer to HTTP compression and gzip compression interchangeably in this post. YNAP uses compression across the board to load pages faster, which makes users happier, and reduce bandwidth costs, which…
A core tenet of infrastructure as code is automation, which we took to heart when setting up the Kubernetes infrastructure for the frontend applications at Net-a-Porter. We split our infrastructure-as-code into three main repositories: Terraform The Terraform repository sets up the AWS infrastructure, including bringing up an EKS cluster and its related resources: autoscaling groups, S3 buckets,…
This is a follow-up to Caleb Doxsey's great article, Kubernetes: The Surprisingly Affordable Platform for Personal Projects. I think Caleb is absolutely right in his description of Kubernetes as a great platform even for small projects that would usually end up in “a small VPS somewhere”, especially if you already have experience with k8s. I've been using Kubernetes on AWS EC2…
We recently got bitten by an innocent and standards-compliant improvement in Azure AD that effectively broke our OIDC-based authentication system for Kubernetes 1.9.x clusters. OIDC, short for OpenID Connect, is a convenient way of providing authentication in Kubernetes. The flow roughly goes as follows: User gets a JWT token from its OIDC provider (Azure AD) User sends this token to Kubernetes…
I recently read Caleb Doxsey's article on how suprisingly affordable Kubernetes is for personal projects and got inspired to spin it up for myself. I'm familiar with Kubernetes at work, but we run our clusters on top of EC2 instances in AWS, and I've always been curious about how a fully hosted Kubernetes offering like GKE would fare. Setting up Kubernetes on GKE itself following Caleb's…
I've been using Radicale as a contacts / calendar server (CardDAV / DalDAV) for some time now, and it worked flawlessly across macOS and Windows Phone for contacts and calendars. However, I recently got an iPhone and synchronising calendars from Radicale just crashed the iPhone calendar app. It worked fine some of the time, but most times it just crashed, which is not great. Therefore, I went on…
Last week I needed to change my defective French SIM card, from Free (who as an aside are an awesome ISP and equally good mobile provider). I happened to be in Paris so I decided to go to the Free shop, as I thought it'd be easier then getting a new SIM card send to my address on file (my parent's address in France) given I now live in the UK.
OVH emailed me a few weeks back telling me that my shared database for the plan that powers uponmyshoulder.com was approaching its (huge!) quota of 25MB, and then again last week to tell me that this time, the quota was reached. Once you reach the quota, the DB is placed in read-only mode, although SQL DELETE commands do go through correctly, as we'll see later. So my first instinct was to see…
A few days ago, a colleague was telling me about a project where she needs to implement a crypto scheme from an external vendor in order to talk to their API over HTTP. For complicated (and probably wrong) reasons, they decided to eschew TLS and develop their own system instead, relying on DES –not even triple DES! Basic DES, the one from the ‘70s that is horribly insecure today– and RC4,…
In 2011 I wrote a small Rails app in order to learn Ruby better and see what all the fuss was about â this was Antipodes, a website that shows you the antipodes of a given point or country/state using google maps. I built it using the latest and greatest version of Rails available at the time, which was 3.2. It has since fell to various security issues and has been superseded by newest version,…
So, remaildr.com had been in a pretty sorry state for a couple of months now, and I kept thinking I should go have a look into it and get to the bottom of the issue. And the bottom of the issue was the 6000 spam emails sitting in the inbox, making the server crash at startup. They're now deleted, and everything is back up and happy. I'm currently thinking about different monitoring options, but…
“So, the tests sometimes fail inexplicably” is a sentence you probably hear pretty often if you're running any type of full-stack, browser-driven integration tests over a large-enough code base, especially when customising on top of an existing product. Today's instance was puzzling at first - the tests would sometimes fail to log in at all. That is, open the login page, fill in the…
Sorry, this is a rant. I was recently investigating Maven plugins for LESS compilation. The use-case is pretty run-of-the-mill (I think?): I want to be able to write a .less file anywhere in my project src/ folder and have Maven compile it to CSS in the corresponding folder in target/ at some point of the build pipeline. I first looked into lesscss-maven-plugin, a short-and-sweet kind of tool that…
I recently had to implement a new functionality for an internal web application:Â a button to download a specially-formatted file. The right way to do it is, of course, to deploy server-side code generating the needed file in the backend and make it accessible to the user via the front-end. The application in question is an important company-wide production system and I was on a hurry, so I…
Sometimes, your network is just too good. Today I ran into this issue as I was testing an application running off a VM in the local network. Latency and bandwidth were excellent, as you'd expect, but nowhere near the conditions you'd encounter over the internet. Testing in these conditions is unrealistic and can lead to underestimating issues your users will experience with your app once it's…
I recently set out to implement a few basic data structures in C for the hell of it (and to reassure myself that I can still code C), and ran into an interesting compiler wart… I was trying to instantiate a static array of 10 million integers (who doesn't?), in order to test insertions and deletions in my tree. However, as you can astutely deduce from the title of this post, this was too…
Long time no blog! Let's get back into it with a nifty and clean way of retaining state in Javascript - closures. I was recently looking for an easy way to call a specific function after two separate/unrelated AJAX calls to two remote endpoints have been completed. The naive method would be to make the first AJAX call -> callback to the second AJAXÂ call -> callback to doSomething, but we can use…
(This blog post is better followed with the associated github repo. Run the Sinatra server with ‘ruby slowserver’, pop up a browser, and follow the revisions to see how the code gradually gets better. :) ) Recently at work, we wanted to modify some js ad code to include weather data for better ad targeting. For certain caching reasons, weather data has to be fetched by an AJAX call,…
Perl::Critic is a nifty syntax analyzer able to parse your Perl code, warn you against common mistakes and hint you towards best practices. It's available either as a Perl module or a standalone shell script (perlcritic). Unfortunately, there is no standard way to integrate it with Jenkins. Jenkins, the continuous-integration-tool-formerly-known-as-Hudson, is the cornerstone of our continuous…
You probably heard of GNU screen. It's handy, ubiquitous, and dead simple. Here's how to use it! Open a terminal and type: screen You're welcomed by an introduction message, press enter, and… You're in a shell. Uh? Screen is simple screen is a terminal manager, so it's logical that the first thing you see when you start it is a terminal. This terminal is as vanilla as the terminal we…
As a follow-up on my previous post on the question, which advocated a simple (but bad) approach to keeping GimmeSomeTune running, here's a better way! The Good Thing (tm) to do is to use OS X's built-in mechanism to start and keep processes running, namely launchd. What we have to do is simply to write a plist containing the info needed by launchd, namely: <?xml version="1.0" encoding="UTF-8"?>…
During the past few weeks, I have been writing a C++ plugin to grade C41 digital intermediates in Cinelerra, an open-source Linux video editor. C41 is the most common chemical process for negatives, resulting in films that look like this â you probably know it if you've ever shot film cameras. Of course, after scanning those negatives, you have to process (“grade”) them to turn them…
Today was the last day of my Rails week. I added some database-backing to my app (with a fully scaffolded model and all!) for the countries’ data and refactored a fair bit, though I'm still unsure about a few decisions I made, such as if I should put the base data in seeds.rb or in a migration. Oh, well. The website is available here: http://antipodes.plui.es And its source code is on…
TL;DR: testing works, I learned i18n, and fixed a bug through TDD. After writing a simple little functional test and making it run through rake test, albeit slowly, I installed Spork and autotest. From what I gathered, Spork is an RSpec-only thing, so I wrote a few RSpec tests instead of functional tests. After a bit of tweaking, everything was going smoothly between Spork and autotest, all…
TL;DR: polishing. Trying to get into TDD, but slowness makes it a strange experience. This “day 5” has been more or less spread over two days because of other engagements (mowing the lawn and subscribing an insurance policy for abroad if you wish to know the details), and I didn't keep precise tracks of the steps I took. The major milestone is that the MVP for Antipodes is online at…
TL;DR: it deploys! Finally! After a full day spend battling cryptic error messages, I finally got my 10-lines Rails app to deploy. First thing in the morning, I decided to switch to using rvm on my production machine too, in order to have the same setup and version on Ruby (1.9.2) for testing and production. This meant also reinstalling the important gems (bundler, rails, rake). The production…
TL;DR: phew. Deployment is hard. Testing is slow. Morning: off due to World Cup; watching of the match against New Zealand. :( Afternoon: while playing a bit more with the prototype, I noticed the logic is actually broken and my way to calculate an antipode was actually broken. This came from the fact that the longitude and latitude coordinates aren't logically the same. Latitude divides the globe…
TL;DR: I have a terribly ugly first draft of the application working! Morning: spent finishing reading the Getting Started guide and beginning the Rails Tutorial. Afternoon: so, let's get down to maps… What's cool in Rails is that there are plenty of gems, and you just have to plug them in, right? GoogleMapsForRails seems like the right tool for the job. After trying to get my posts to be…
TL;DR: I began learning Rails this morning, and even though Rails in itself is (seems?) easy enough, setting everything up and deploying is hairier. 8:00: let's get started! First step: getting vagrant up and running. We'll hit the tutorial. 8:15: the lucid32 “box”, Vagrant's parlance for a virtual machine image, is downloading. Time to get a cup of coffee. 8:40: box downloaded, let's…
Tl;dr: I'm learning Rails in a week! And I'll blog about it all along. Any tips? So. Learning Rails. As a recent graduate in CS, moving to a new country in two weeks and looking forward to expand my skills, Rails looks like a good fit: it's in demand, it focuses on developer happiness, vibrant ecosystem yadda yadda. You probably already know this so let's cut the marketing speak! Methodology My…
The Community-Scheme-Wiki has a pretty interesting way of highlighting lispy code Scheme being a Lisp dialect, it makes sense to highlight the S-expressions, i.e. “things between parenthesis”. The Community Scheme Wiki does exactly that. As you move your mouse over the code, it will highlight the s-expression you're in and the ones around in different colors, allowing you to quickly…
Apple's latest MacBook Air boasts to last 30 days on battery when sleeping. Classical sleep will power down most of the machine (display, processor, hard drive, etc) but keep the RAM powered on in order to keep the state of the OS. However, the RAM drains too much power to realistically allow more than a week or so on a single charge. The MBA feat is achieved through “deep sleep”, i.
So… Turns out there is no shortcut to turn text to semibold in Apple Pages, from the iWork suite. There are shortcuts for bold and italic respectively, but not semibold (or light / ultralight for that matter) even for the fonts that support it. The closest thing to a solution that I found is through Character Style: Select a piece of text, make it semibold In the Styles Drawer, under…
I use GimmeSomeTune to provide hotkeys and some other goodies for iTunes. It works alright, but is veeeery crashy – usually every dozen hours or so on my machine. How to fix that? Let's relaunch it as soon as it crashes. Simple! In a terminal: for (( ; ; )); do open -W /Applications/Multimedia/GimmeSomeTune.app/; done open is the bash command to launch applications on OS X. It works with all kinds…
I was recently developing a Sinatra app that wanted to host from home â setting it up Heroku would have meant migrating from SQLite to Postgres, and I'm lazy. The problem was that I already happened to have an Apache server at home to serve some other content, specifically some calendars through the WebDAV module. The solution I used was simple: instead of having Apache listening on port 80, I…
As you may have noticed if you write a blog, however modest it might be (such as yours truly), you'll receive spam comments. A lot. Things like that: Spam like this is usually obvious. Thankfully, some spammers go out of their ways to create engaging messages to fool your filters, both automated (like Akismet, who dutifully collected all the ones exposed in this post) and human. I've been…
That's awesome! But maybe you don't know where to start. So here we go! Wait, the what? Structure and Interpretation of Computer Programs, a.k.a. the SICP, is an MIT class teaching computer languages turned into a book. Why should you care? I'll let Stack Overflow answer: SICP, however, is in a different league. It is a book that will enlighten you. It will evoke in you a passion for writing…
If you ever backed up Aperture projects outside your standard library, you probably noticed the default format for exported albums changed from .approject to .aplibrary in the update from Aperture 2 to Aperture 3. The Finder correctly reports these new .aplibrary as “Aperture Library”, but it seems to have forgotten everything about the old .approject who now appear as standard folders…
Wordpress automatic updates never work. No matter if it's a major version change or just a small bump (let's say… 3.0.4 to 3.0.5, uh?), I always end up downloading the whole thing and updating it manually because the update page stops responding and plainly goes blank. Instructions for update are here, by the way. And after the steps to update, they include that little snippet of wisdom:…
Samuel Clay shares an awesome little tweak: replace Snow Leopard's Dock.app by the Dock.app from a beta version of SL, and Exposé will get back to the way it acted on Leopard, i.e. the size of the thumbnail is proportional to the size of its window. And it rocks.
You might encounter this error while trying to install the pg gem (v0.10.1), or when updating from v0.10. My stacktrace on Mac OS X Snow Leopard 10.6.6 with Rubygems 1.4.2, Ruby 1.8.7 and Postgres 9.0.2 was the following: Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.…
For all of you number junkies out there: Tunalysis development is doing good, as sporadic as it may be. The next step is to rework/refine the algorithm giving rankings, in order to achieve better results. I'll try to include the “Last Played Date” in the mix, and maybe also use the Date Added. More good news: no need to install gems by yourself anymore, everything's included by…
This post will explain how to set up a Postfix mail server on an EC2 instance. First, a word of warning: Amazon IPs generally aren't highly considered, spam-wise. Meaning that even if you take all the precautionary steps, your emails might end up in spam folders. If email is business-critical for you, you might want to consider other options: host your mail server somewhere else? Use something…
Here are a few small things you might want to know about http://remaildr.com. Or maybe not, but then again, nobody forces you to read, stranger! “Hardware” Remaildr is hosted on an Amazon EC2 micro instance, benefiting of the free tier offer. Apart from the static IP that will probably end up costing me something, remaildr should be about free. – Edit: as of may, remaildr is now…
Tunalysis is a small(ish) Ruby script that will read your iTunes library, crunch numbers, and gives you a few interesting facts about it, such as: Total number of songs Total number of playlists Average song length Average bitrate Average play count Average skip count Total time spent listening to music Some of these statistics are already available in iTunes, but Tunalysis ultimate goal is to…
Yesterday, my little brother was typing something on a linux bash and suddenly went back to the beginning of the line with a simple Ctrl-a. It blew my mind. I don't know why, but it never occurred to me to look for shortcuts in Terminal (and bash in general), other than Ctrl-c for badly behaving processes. I just cursed myself and frantically typed on the left arrow key each time I typed cd…