PHP 8 Attribute Syntax

Thu 02, Jul 2020

So @@ reaches the quota and has been elected as the final attribute syntax for PHP 8.

@@ will be the attribute syntax for PHP 8:

@@SomeAttribute
class Something {}

I personally think that choosing @@ was the right decision.

If you don't really know what's going on with those attributes, read this!

Source

Blogs without feeds

Mon 01, Jun 2020

Just visited yet another interesting tech blog without a feed - no RSS, Atom, JSON.

I don't get why some people don't put a feed on their blogs; That way I could easily subscribe to it and read their upcoming posts. Now I would have to bookmark it and re-visit it every few days.

Pro tip: tag feeds on maxbits.net

Thu 14, May 2020

Just a quick pro tip for you: if you want to get the feed of only a specific tag of my blog, use the following URL scheme:

https://www.maxbits.net/feed/{atom|rss|json}/{tag}/

Example: If you wanted to only see webdev-related posts in Atom format:

https://www.maxbits.net/feed/atom/webdev/

This feature has been around for quite some time now, but most people probably don't know it

¯_(ツ)_/¯

My Git Mirror

Mon 11, May 2020

I just mirrored my GitHub repositories, just in case they go down, at git.maxbits.net. I'm using GitList for now.

Switching to a new UniFi controller

Tue 05, May 2020

My new CloudKey Gen2 Plus just arrived in the post today. Moving everything over with next-to-no downtime was very simple:

  1. Get a backup: Settings -> Backup -> Download file (you can adjust the timespan)
  2. Shut down the controller
  3. Open up the new controller
  4. Select Restore from backup in the setup and upload the backup file

That's it!

The UniFi AP-AC Lite

Mon 04, May 2020

I love the UniFi AP-AC Lites. They're awesome. Another one came in the post today and I was really hyped to set it up. They have an amazing reach and good speeds. Setting new ones up is as easy as plugging them into the network, opening up the UniFi network controller and integrating the new AP.

About 1 month ago I started with the UniFi system and it's really awesome - everything in one place. They not just have a really cool web dashboard, but a beautiful iOS app as well. Setting things up is really easy and extremely quick.

Edit: one thing that's really worth mentioning too: their packaging is nearly only made from paper! Really cool!

Add CSS to a page using HTTP headers

Tue 28, Apr 2020

Hey y'all,

I just read about the Link header at Impressive Webs. It works just like the <link> HTML tag. That means that you can use it to add stylesheets to a website! Below is a PHP-based demo:

The page:

<?php
header('Link: <styles.css>; rel=stylesheet');
echo '<p>Some text here. This will get displayed using a sans-serif font if your browser supports the Link header. If not, your browser\'s default font will be used.</p>';

The stylesheet (named styles.css):

html,
body {
    font-family: sans-serif
}

The header will look like this:

Link: <styles.css>; rel=stylesheet

You can add multiple stylesheets by adding multiple Link headers, btw.

Browser support

Even though this is a standardized feature that has been around since HTML4, it seems to work in Firefox only. It is not deprecated, though. This is what the HTML4 spec says about it:

This section only applies to user agents conforming to versions of HTTP that define a Link header field. Note that HTTP 1.1 as defined by [RFC2616] does not include a Link header field (refer to section 19.6.3).

Why bother if it's only supported in Firefox?

I think it's just something really cool to look at. If you use it in a project, I'd highly recommend you to use <link> in addition, because otherwise most users probably won't see your stylesheets.

If you want to find out more about it, I'd highly recommend you to read this article at Impressive Webs and look at the Link header's MDN page.

Internet Outage

Tue 28, Apr 2020

Had an internet outage yesterday. Seems like I wasn't the only one having trouble. The problems are resolved for me now.

Rewriting this site using Sierra

Mon 20, Apr 2020

Hi!

Over the last few days I've been re-writing this homepage yet another time. This time using my new framework.

A few URLs might have changed and some stuff has been removed, keep that in mind if you've linked to this site in the past.

Silence

Sun 12, Apr 2020

I just walked around the city's fields. My city is sourrounded by highways, you can always hear their constant noise. But today, everything was silent. You could only hear some birds chirping. Incredible.

You are on page 1 right now.


Back to top