Instagram's New Feed

Sounding like an exhausted parent, Mosseri agreed that Instagram’s new feed sucked and its recommendations might be bad and then told us it wasn’t going to get better. Instagram no longer cares about photos.

The Verge

I don't know if people are just upset because something they're used to changes, but I'm not happy with Instagram showing me lots of videos and reels from people I don't know. For some reason, the algorithm has decided that I like watching baseball videos. No, I don't.

My usecase for Instagram is quite sepcific. I use it mostly to just look at pretty pictures of bicycles :) If you want to see pictures of a specific bike and you know the model and brand, it's a lot easier to find pictures from Instagram than from Google image search.

AWS RDS Automatically Starts Stopped Instances

AWS RDS Stop notification

I just learned the hard way, that my old stopped AWS RDS DB instance had been automatically started. I started digging why my AWS bills had been increasing in the last two months, and I noticed that an old test instance had been started.

Yeah, there is a clear notification about the automatic restart, but somehow I had missed it. Now I learned the hard way and deleted the instance.

403 Errors Fixed

It turned out my random 403 errors yesterday were caused by an incorrect KeyCDN configuration. The problem was the Block Referrer setting that was causing problems with Twitters short URL's.

Twitter automatically shortens URL's using domain, and on redirect to the original URL Twitter adds as the referer header. This will cause KeyCDN to return a 403 Forbidden error if your Block Referrer settings are incorrect.

AWS Elastic Beanstalk - Dump Environment Variables to .env File

I've been testing AWS Elastic Beanstalk for a PHP app that's loosely built on Symfony components. I've been using Beanstalk for some simple apps, but this is a bit more complex and I ran into trouble with defining environment variables and accessing them from both web and the console.

Why Environment Variables?

Almost all apps need some kind of configuration variables for the different environments where your application runs in. For example, your local development machine has different database credentials than your production environment.

These credentials need to be accessible from code, but they should not live in your codebase. This is exactly what environment variables are for. They are related to the environment where your code is running.

Environment Variables in AWS Elastic Beanstalk

Elastic Beanstalk has a simple UI for managing environment variables. This is the perfect place for things like database settings or defining paths for data folders.

All the variables defined in the console will be available in your web app.

Dumping the Variables into an .env file

For most cases using Symfony and PHP defining the variables in the AWS Beanstalk console is usually enough. I had a slightly different use case where I'm also running some command line scripts inside the same container.

For some reason the environment variables are not available if you're running a command line script on the instance. My solution was to just dump all the variables into an .env file and load that file in my command line script.

Luckily, this was quite easy after a few tries and errors.

Define a Post Deploy Script

Elastic Beanstalk has multiple ways to modify the environment where the application runs. I used postdeploy hooks to dump the environment variables. Here's the script:

// .platform/hooks/postdeploy/

/opt/elasticbeanstalk/bin/get-config --output YAML environment | sed -r 's/: /=/' > /var/www/html/.env

Notice, that all the hook scripts need to be executable, so remember to chmod a+x that file.

The get-config command is an internal tool provided by AWS, that will output all the environment variables. In this case, I'm fetching them in yaml format. The sed command just replaces all the : in the yaml file with =. That's the usual format for .env files.

And the last bit > /var/www/html/.env just outputs all of that into a file called /var/www/html/.env. That's where my application reads the env variables from.

Conclusions and Next Steps

And that's it! It's pretty simple and it works, but I think there's some room for improvement.

From a performance perspective it might be useful to dump the file contents into a php file. Symfony already has some scripts to automate this, but I'll need to look into this in more detail.

Raspberry Pi as an iPad Accessory

I've been thinking about getting a Raspberry Pi. I'd like to set it up as a Tor wifi router using Torbox or maybe as a bluetooth audio receiver to connect audio wirelessly to my old amplifier.

But this video from Tech Craft got me thinking, I could use Raspberry Pi as an accessory for my iPad as well! That seems like a cool approach for using the iPad for software development.

Enable a TOR Hidden Service for a Clearnet Website

Russia's war in Ukraine has made it clear that there's a great need for bypassing state controlled firewalls to be able to access independent media. Yesterday Twitter announced that its service is now accessible using TOR. Twitter's onion service is available at


This is great news for anyone who's interested in privacy or lives under an oppressive regime.

I urge anyone running a website to make it available as an onion service.

Enable a Hidden Service for a Clearnet Website

Here's a great post by Jamie Scaife explaining how you can forward a hidden service to a clearnet website. It's surprisingly straightforward.

Obviously, this isn't for someone who's trying to hide their website completely. It's targeted towards people who want to offer an anonymous onion service for their clearnet website. Basically, it's using a hidden service as a kind of reverse proxy in front of the clearnet website.

Mainstreaming TOR

Usually, TOR and the darkweb has been linked to malicous and illegal activities like drug trade. Now that services like Twitter, Facebook, The BBC and New York times are available as onion services, I think it's clear that TOR is becoming more mainstream.

Do you have a website? Make it available as an onion service today!

CloudWatch Logs and Elastic Beanstalk

Like I said yesterday I've been working on an AWS Elastic Beanstalk project. It's one of my favourite environments for hosting PHP web apps.

I think I got everything set up now. Today I got

  • Application logs published to CloudWatch Logs
  • Anonymize http logs (remove client IP addresses)
  • Send email alerts of logging errors from the application

Next Steps

Nest step is to install a TOR Hidden Service in front of the application. I've followed this guide in another project. It's a cool approach if you just want to offer an .onion url for your clear web application.

Last updated June 21, 2022 17:09

Building a Server Side Rendered Symfony App

Back to the roots. It's been ages since I've built a traditional server-side rendered web application, and oh boy does it feel good :)

No hassle setting up build processes or working with the latest JavaScript framework that gets replaced by a dozen new ones in the few days you've been building your app. I had totally forgotten how good developer experience Symfony offers. It's always been good, but DX has gotten a lot better in the last few years when I haven't been paying that much attention.

I think this is exactly what I've needed as a developer.

Wealth to Scale

Here's a cool visualization of wealth shown to scale. This has probably already made some rounds in the Internet and I spotted this from The Verge. \n\ntechnically, I really like this visualization. I didn't have time to look at the code yet, but I'll do that later on.

Last updated May 4, 2020 12:05

Playing Around with Kindle

A few weeks ago I (finally!) got myself an Amazon Kindle. It's even better than I expected! I've been playing around creating PDF's from websites and sending them to my Kindle for reading. \n\nI'm even thinking about adding a Send to Kindle button to my favourite RSS reader.

Last updated March 24, 2020 20:19

Could Someone Explain the "Link Tax" to Me?

Article 11, which critics have dubbed a “link tax”, would force news aggregation and search sites such as Google and Facebook to pay publishers for showing news snippets or linking to news stories on other sites.

The Guardian

What? Isn't Facebook and Twitter where publishers get majority of their traffic from?

You've probably heard of this new piece of EU legislation and the controversial articles 11 and 13. I don't know enough of the article 13 to really have an opinion about it, but the article 11 seems really scary. Lets hope that it doesn't go through like this.

Article 11 is really bad news for news aggregators or RSS readers like Social Layer. No one seems to be absolutely sure what the concrete implications of this will be. Maybe this will be like GDPR (if this will ever pass the final vote) that nothing really changes that much after all.

So, how does it work. Do I have to pay because I just linked to an article in The Guardian? How much money will I get if The Guardian ever links (I wish) to my blog?

Last updated June 21, 2022 17:13

I Don't Know What to Think of GDPR

This whole GDPR thing is getting out of hand. Here's a list of websites that are now blocked in Europe, thanks to GDPR. I guess they are just being overly cautious before the dust settles and things get back to normal.\n\nAnd already, on day one of GDPR, Facebook and Google are hit with a lawsuit. That was expected, I guess. I'm really interested in seeing what the outcome of all the lawsuits will be and I hope the lawsuits will clarify some of the interpretations of GDPR.

I wish the EU would have provided some concrete, real-world example cases how to handle personal information in different situations. For instance, IP address is considered personal information and you're not allowed to store personal information without user's consent. So what happens to web server log files? All web servers collect and save IP addresses. It seems it's not quite as black and white as that. Here's a great article concerning web server logs and saving IP addresses without the user's consent.

What about the addressbook in my email client? It automatically saves all the names and addresses that I have corresponded with. Is my addressbook a register? Do I need to email everyone and ask for their consent to still exist in my addressbook? I don't know.

Yeah, GDPR is funny.

Last updated June 21, 2022 17:15

It's GDPR time!

How many GDPR notices have you received in the last couple of days? 10? 100? More?

I want to get on that bandwagon too :) So, I've updated the privacy policy of this website. There's nothing special. It's just saying we use cookies, Google Analytics and the web server collects logs with your IP address in them. Pretty standard stuff for a website.

I didn't even remember I use Google Analytics. I guess this was one of the key poins of GDPR, to get companies to look at what data they collect and why. I look at Google Analytics data a couple of times a year and (on this site, at least) it feels like a waste of time and an invasion of privacy. I guess I'll just remove it in the future.

Last updated March 14, 2022 14:08

How Fast is AMP?

And for more often than not, these non-AMP versions are heavy and slow. If you’re reading news on these sites and you didn’t click through specifically to the AMP library, then AMP hasn’t done a single thing to improve your experience. AMP hasn’t solved the core problem, it has merely hidden it a little bit.

Tim Kadlec

Here's a great and in-depth analysis of the performance of Accelerated Mobile Pages by Tim Kadlec. AMP doesn't offer anything you can't do with a proper build process and any CDN you choose. But if you want your pages to appear in the Google search carousel, AMP is your only option.

I don't really know what to think of AMP anymore. I like the idea of making the web faster, but I'm starting to think that AMP is not the way to go. AMP is only useful, if you want your content to be displayed in the Google search carousel. Period. That's it. If you want your website to load fast, just make it fast. You don't need AMP for that.

Last updated June 21, 2022 17:16

Web Manifest Problems and Content Security Policy

Ah, stupid me. I've been banging my head on the wall for almost an hour trying to figure out why Chrome is not picking up my web manifest. I recently modified the server to return the strictest possible CSP headers for my use case. I used default-src 'none' but I didn't explicitly set the manifest-src property.

Service worker does not successfully serve the manifest start_url.

So there you go. If you get these kinds of errors in Lighthouse audit be sure to check your CSP headers.

Last updated June 21, 2022 17:17

Jackdaw's Nest

This is a place for my personal IT ramblings. I'm the CTO at Skillhive and the founder of Innota and Wrote. I work mostly with PHP and JavaScript.