> beautiful code & photos

about <

Blue Monday

Lundi matin 5h30.

Merde, je suis déjà réveillé. Mon cerveau est déjà en route, ou alors ne s'est pas arrêté la veille. Cela me fait penser à tous mes amis qui n'arrivent pas à trouver le sommeil. Il fait froid mais j'ai trop la flemme d'aller chercher le plaid. Aller Joris, une grosse semaine se présente à toi et il faut dormir.
Tant bien que mal je parviens à me rendormir...

8h00 : le réveil sonne et là, c'est dur. J'ai rêvé entre temps de choses très désagréables, un vieux sentiment d'abandon me fait frissonner et je n'ai qu'une hâte : vérifier

> Continue Reading

Ghost: How I moved my images to Cloudinary

For the past two weeks, I have been very busy moving all my Ghost apps images over to Cloudinary. As you probably know, my Photography Portfolio is running with Ghost and even there is not a ton of content, I needed to ensure it could meet these requirements:

  1. Deliver top quality images faster than my hosting solution
  2. Support RetinaJS assets upload via Ghost

If I was pretty confident with the 1st requirement, the 2nd was a tricky one in addition to move all existing content in Cloudinary.

A new Cloudinary storage adapter for Ghost

I looked for existing

> Continue Reading

MySQL: Table count for all databases

Answers I found on the internet were all based on the table information_schema.tables but truth is, this table contains table schemas of databases, not the database list.

What happens when you also need to include databases with no table?
Answer with this query:

SELECT SCHEMA_NAME AS 'Database', COUNT(information_schema.tables.TABLE_SCHEMA) AS 'Table Count'
FROM information_schema.SCHEMATA
LEFT JOIN information_schema.tables ON information_schema.tables.TABLE_SCHEMA = information_schema.SCHEMATA.SCHEMA_NAME
WHERE SCHEMA_NAME NOT IN ('mysql', 'information_schema', 'performance_schema', 'tmp')
| Database | Table Count |
> Continue Reading

Chakram & JSON schema structuring

I know, Chakram is old (no update over a year) but I use it in one of my project because along with Mocha and Chai, it makes a pretty powerful tool for a NodeJS functional testing stack.

For the past few hours, I've been trying to reference a JSON schema from another one stored in the very same directory.

Understanding the documentation about structuring JSON schema is pretty straightforward but in real life, it gets more complicated when you don't fully understand how it really works (and I still don't, don't get me wrong).

The issue

Let's say, I have

> Continue Reading

AWS ECS: seamlessly handle app versioning

Our latest project at work involved another Go API and in the effort of easing our debugging and issue tracking I'm used to inject the app version into the logs.
It helps a lot monitoring, especially when rolling out a new version (canary, 50% traffic deployment, etc.).


Pre-2018, I hardcoded the version in an app constant which I would increment as part of my release process. It's easy, quick but the only issue is to not forget about it because you may lose versioning syncing over time.

Plus, considering this to be done before each new release, this adds

> Continue Reading

S3: List objects using filters

One thing that really sucks about the Amazon S3 command is not being able to efficiently list objects using the exclude and include filters.

I recently had a case when I needed to list GZip archives from one of our S3 buckets but only the ones ending by .gzip.

Since the ls command doesn't support filters (yet?), I found another way to get that listing: use the cp command, but in dry-run mode:


# Very important: DO NOT remove the --dryrun flag!
aws s3 cp s3://bucket-name . --recursive --no-progress
> Continue Reading