Hello World From Hugo

Hi, This is my first post on my new Hugo website. I’ve relaunched this old PicoCMS page in favor of probably the most used static generator at least in my corner of the internet. I included a few old posts from my old blogger.com blog called ‘iamnodev’, since I am planning on retiring that one. I fiddled a bit with this theme in particular to get things going and I am quite pleased with the results....

2023-08-18 · 1 min · 211 words · Jan Kapellen

Testing certificates with openssl

Nowadays I have to check ssl-configurations quite often and have to accomodate a blur of different CA’s intermediates and wildcard certs. So for the most basic stuff I reccomend taping Julia Evan’s openssl cheat sheet somewhere in plain view until you can type the commands from it blindly. But in some cases I needed to… verify a certificate from your disk against your systems CA You download or receive a certificate from somewhere, but before installing it, you want to see if it really works:...

2019-01-29 · 2 min · 270 words · Jan

S3 API too slow? xargs to the rescue.

My days as a BigData engineer grew darker in the past few days. Now almost all critical data that our aggregations, partners and customers want to access is located in a bucket on Amazon’s S3. Since that gets horribly expensive for the vast amounts of data we create on a daily basis, we lean towards not keeping much more than a month of active objects in the bucket, to meet our SLA’s regarding backup and recovery, we keep them for about a year in Glacier afterwards....

2016-05-13 · 2 min · 362 words · Jan

Python3,float and math, what the hell?

So it was late at night and I was hacking away at my touch-controls for my UnicornHat. I was trying to set the brightness in nine steps between 0.1 and 0.9. When all of a sudden, this happened: >>> foo=0.1 >>> foo+=0.1 >>> print(foo) 0.2 >>> foo+=0.1 >>> print(foo) 0.30000000000000004 So according to my internal senses this looked not very precise. But according to the almighty Stackoverflow and one of my beloved coworkers who can indeed speak ASM fluently, this is in fact very precise (for a float)....

2016-03-14 · 1 min · 183 words · Jan

When you're generating queries from resultsets of other queries ...

I just hit a point in an app I am currently developing, where I found myself generating queries from the resultset of another query. Because, what can possibly go wrong, right? $selectors = array(); $query_phase2 = "SHOW KEYS FROM `".$row['table']."` WHERE Key_name = 'PRIMARY'"; $query_phase3 = "select `".$row['field']."` from `".$row['table']."` where "; if($result = $GLOBALS['dbconn']->query($query_phase2)) { while ($row = $result->fetch_assoc()) { if(array_key_exists($row['Column_name'], $data)) { $qextender = "`".$row['Column_name']."` = '".$data[$row['Column_name']]."'"; array_push($selectors,$qextender); } } $query_phase3 ....

2015-07-16 · 1 min · 121 words · Jan