MySQL: deleting a huge amount of rows
One of our MySQL tables has started to grow out of control with more than 1 billion rows (that’s 109).
The table is a typical “Rails Active-Record table” with id as primary key (auto increment), created_at, updated_at and a few columns for the business data.
The table has multiple indexes on various columns, some of them having a cardinality in the millions. created_at and status don’t have an index.
The majority of results from Google, involved peoples with millions of rows and deleting them in batches of 1000.
Read More…
converting dynamic sites to static hosting
Why? Security and speed are the two main factors that made me migrate dynamic sites to static sites.
I used to build some small sites without any framework using PHP to reuse common files (headers, footers, database connections) with some minimalistic administration pages to avoid to do vi over ssh to manage content. Security wasn’t a concern, Internet users where nice and respectful back then (or more probably I was young and naive).
Read More…
From Wordpress to Hugo
As mentioned in Going Static, I migrated my Wordpress blogs to a static site build with Hugo. Most articles on the subject convinced me that it would be easy. The truth is, it isn’t that straight forward.
Content With help of a Wordpress plugin, exporting your posts and content is easy. The plugin adds the necessary front matter in Yaml format. But you still need to go through all your posts to update manually all image references.
Read More…
Going Static
I hosted my blog with Wordpress on my own VPS. The amount of attacks and successful hacks on this blogs is enormous. Wordpress just suffers from notoriety and therefore becomes an easy target.
Maintaining Wordpress up-to-date and add some tricks to minimize the risks just didn’t become worth the pain anymore. On top of that, maintaining a VPS to run Apache, PHP and MySQL to serve a few never changing posts didn’t make sense anymore.
Read More…
The Corporate Disease
The tech B2B world has changed in the last decade. It used to be sales talks to sales and agree on a product and price. Then give the job to the tech team.
In a tech-startup, Geeks are King. They decide what’s useful or usable.
If you can’t convince the geek, you won’t get the business.
At Spuul, I am on geek-side of the chain, and too often I had to experience the lack of market knowledge from some corporations.
Read More…
Photoswipe plugin for Koken
Yes, I know! Again an article about Koken! This time it is about front-end, something I am really not familiar not at ease with, Thanks Steve for your help and trying to convince me that async is not that evil. The default Lightbox functionality from Koken has always annoyed me. Specially in a mobile world where swiping has become a defacto standard. Enters Photoswipe.
Read More…
Koken: Serve assets through CDN
You can highly improve your site display speed by using a CDN. This is also true with Koken.
Koken doesn’t provide a “out of the box” way to handle CDN, so I wrote a plugin to allow you to serve your Koken assets through edges closer to your visitors.
Read More…
Boost your Koken speed with client-side caching
Koken’s default caching behavior is non-existent. Apart from the Photos who have a 1yr cache policy, all other assets have a Cache-Control: max-age=0.
With just a little bit of configuration, you can highly improve the user experience for your visitors.
Read More…
AWS, VPN and Public IP
Once you start to integrate services with Telcos, ISPs or other major Network players who are not “Cloud Aware”, you will need to go the VPN way using IPSec. Their setups have used all the available IP’s defined by RFC 1918 (or just don’t want to use them). They will want to use Public IP’s behind your VPN.
The problem is that your EC2 instances are running behind a 1:1 NAT with only a private IP’s attached to them. To add to the complexity, your instances are part of an auto-scaling group, with IP’s all over 10.0.0.0/8.
Luckily the way to solve this problem is actually quite easy, we just need to add some iptables rules and a proxy.
Read More…
OpenTTD: Timelapse from game save
This script allows you to create a timelapse video from your OpenTTD game. It will use your previously saved games. No need to remember to take screenshots during the game, ad since you play it safe and save before and after each big civil engineering work (ooops ?), you will have enough frames to create a nice work to put into your Company heritage cabinet.
The resulting video is zoomed into a defined location and works with large games (tested on a 512x512 map).
Read More…