kernelle

joined 2 years ago
MODERATOR OF
[–] kernelle@0d.gs 6 points 10 hours ago

It's to prevent you from becoming flying debris

[–] kernelle@0d.gs 2 points 2 days ago

Yeah that's what I'm trying to avoid, using grep displays all of my options at once.

[–] kernelle@0d.gs 3 points 2 days ago* (last edited 2 days ago) (1 children)

You can use regular strings! Can't tell you how often* I use:

history | grep docker
[–] kernelle@0d.gs 7 points 2 days ago (9 children)

history | grep

I like seeing different usages

[–] kernelle@0d.gs 2 points 2 days ago

You'd be surprised how caked a charge port can be, you know you've cleaned it correctly when the plug goes in all the way and doesn't stick out a bit.

When it still doesn't connect correctly and/or you feel play in de cable/chargeport, it might just need replacing.

[–] kernelle@0d.gs 2 points 3 days ago

I'm thinking its harder to get sub 15ms consistently maybe? Brussels, Amsterdam, Paris, expected lightspeed times of 1-2ms, in reality you'll get 10-20ms.

Global internet is optimized for global connectivity, I'm imagining resources are better spent optimizing the 50-200ms range than the 1-10ms.

[–] kernelle@0d.gs 10 points 3 days ago

Commentiquette fans in a nutshell

[–] kernelle@0d.gs 2 points 3 days ago

This is an Azimuthal projection with viridis, tried a few but liked this one the best!

[–] kernelle@0d.gs 1 points 3 days ago

That was experimenting, the actual graph shown is the other way around, so it shows the real differences, not just compared to lightspeed (ie I forgot to remove the '1 -' from the label)

[–] kernelle@0d.gs 1 points 3 days ago

Looks great I'll be checking different color scales, I'm still figuring out the plotting library though.

[–] kernelle@0d.gs 2 points 3 days ago (2 children)

Ah yeah ofcourse I was experimenting with comparing it with the lightspeed itself, then inverting it with -1 so its coloured correctly. My mistake not changing the label enough.

Then the scaling goes up to 10

That is actually the real scale, in Europe we get theoretical speeds of 2-3ms according to the speed of light. Real RTT's in Amsterdam for example are around 20ms, so you get values >10. The further you go from the EU, the closer to ideal times.

It's interesting to see the places where connectivity is much better or worse than the surrounding areas.

[–] kernelle@0d.gs 7 points 3 days ago (1 children)

Nice catch! I centered there to fit the entire world on the map. Here's centered on London:

 

Located in London, I measured the RTT or round trip time to 574,691 random webservers and plotted the times on the globe.

Discovery was done with masscan, measurements using hping and plotting with an old Python script I've revived and enhanced.

This is part of the next writeup on my blog, with which I will be posting any of the code I've used.

Blog / How I made a blog using Lemmy

 

The academic halls of Harvard Kennedy School in Massachusetts welcomed a new face in 2024 - not just another high-achieving student but a future monarch.

Princess Elisabeth, who turned 23 on October 25, 2024, began a two-year master's programme in public policy last September. While she may not yet be a familiar name in the United States, she's a royal figure destined to shape history.

ndtv.com

 

Belgium could potentially have additional F-35 fighter jets manufactured in Italy instead of the United States, according to Defence Minister Theo Francken.

Belgium has already ordered 34 F-35 jets from US manufacturer Lockheed Martin, with production currently based in Texas. However, Francken plans for any additional jets to be produced at Lockheed Martin’s facility in Italy.

brusselstimes.com

1
submitted 4 weeks ago* (last edited 3 weeks ago) by kernelle@0d.gs to c/self@0d.gs
 

This is a followup to my introduction of BlogOnLemmy, a simple blog frontend. If you haven't seen it, no need because I will be explaining how it works and how you can run your own BlogOnLemmy for free.

Leveraging the Federation

Having a platform to connect your content to likeminded people is invaluable. The Fediverse achieves this in a platform agnostic way, so in theory it shouldn't matter which platform we use. But platform have different userbases that interact with posts in different ways. I've always preferred the forum variety, where communities form and discussion is encouraged.

My posts are shared as original content on Lemmy, and that's who it's meant for. Choosing for a traditional blog style to make a more palatable platform for a wider audience, and in this way also promoting Lemmy.

Constraints

Starting off I did not want the upkeep of another federated instance. Not every new thing that is deployed on the Fediverse needs to stand on its own or made from the ground up as an ActivityPub compatible service. But rather use existing infrastructure, already federated, already primed for interconnectivity. Taking it one step further is not a having a back-end at all, a 'dumb' website as it were. Posts are made, edited, and cross-posted on Lemmy.

The world of CSS and JavaScript on the other hand - how websites are styled and made feature-rich - is littered with libraries. Being treated like black boxes, often just a few functions are used with the rest clogging up our internet experience. Even jQuery, which is used by over 74% of all websites, is already 23kB in its smallest form. I'm not planning on having the smallest possible footprint†, but rather showing a modern web browser provides an underused toolset of natively supported functionality; something the first webdevs would have given their left kidney for.

Lastly, to improve maintainability and simplicity, one page is enough for a blog. Provided that its content can be altered dynamically.

See optimization

How it's made

Graphviz

1) URL: Category/post

Even before the browser completely loads the page, we can take a look at the URL. With our constraints only two types of additions are available for us, the anchor and GET parameters. When an anchor, or '#', is present websites scroll to a specific place in a website after loading. We can hijack this behavior and use it to load predefined categories. Like '#blog' or '#linkdumps'. For posts, '#/post/3139396' looks nicer than '?post=3139396', but anchors are rarely search engine compatible. So I'm extracting the GET parameter to load an individual post.

Running JavaScript before the page has done loading should be swift and easy, like coloring the filters or setting Dark/Light mode, so it doesn't delay the site.

2) API -> Lemmy

A simple 'Fetch' is all that's required. Lemmy's API is extensive already, because it's used by different frontends and apps that make an individual’s experience unique. When selecting a category, we are requesting all the posts made by me in one or more lemmy communities. A post or permalink uses the same post_id as on the Lemmy instance. Pretty straight forward.

3) Markdown -> HTML

When we get a reply from the Lemmy instance, the posts are formatted in Markdown. Just as they are when you submit the post. But our browsers use HTML, a different markup language that is interpretable by our browsers. This is where the only code that's not written by me steps in, a Markdown to HTML layer called snarkdown. It's very efficient and probably the smallest footprint possible for what it is, around 1kB.

Optimization

When my blog was launched, I was using a Cloudflare proxy, for no-hassle https handling, caching and CDN. Within the EU, I'm aiming for sub-100ms† to be faster than the blink of an eye. With a free tier of Cloudflare we can expect a variance between 150 and 600ms at best, but intercontinental caching can take seconds.

Nginx and OpenLiteSpeed are regarded as the fastest webservers out there, I often use Apache for testing but for deployment I prefer Nginx's speed and reliability. I could sidetrack here and write another 1000 words about the optimization of static content and TLS handling in Nginx, but that's a story for another time.

For the website, API calls are made asynchronously while the page is loaded and are not counted

Mythical 14kB, or less?

All data being transferred on the internet is split up into manageable chunks or frames. Their size or Maximum Transmission Unit, is defined by IEEE 802.3-2022 1.4.207 with a maximum of 1518 bytes†. They usually carry 1460 bytes of actual application data, or Maximum Segment Size.

Followed by most server operating systems, RFC 6928 proposes 10x MSS (= Congestion Window) for the first reply. In other words, the server 'tests' your network by sending 10 frames at once. If your device acknowledges each frame, the server knows to double the Congestion Window every subsequent reply until some are dropped. This is called TCP Slow Start, defined in RFC 5681.

10 frames of 1460 bytes contain 14.6kB of usable data. Or at least, it used to. The modern web changed with the use of encryption. The Initial Congestion Window, in my use case, includes 2 TLS frames and from each frame it takes away an extra 29 bytes. Reducing our window to 11.4kB. If we manage our website to fit within this first Slow Start routine, we avoid an extra round trip in the TCP/IP-protocol. Speeding up the website as much as your latency to the server. Min-maxing TCP Traffic is the name of the game.

Can vary with MTU settings of your network or interface, but around 1500 (+ 14 bytes for headers) is the widely accepted default

10kB vs 15kB with TCP Slow Start

Visualizes two raw web requests, 10.7kB vs 13.3kB with TCP Slow Start

  • Above Blue: Request Starts
  • Between Green: TLS Handshake
  • Inside Red: Initial Congestion Window

Icons

Icons are tricky, because describing pixel positions takes up a considerable amount of data. Instead SVG's are commonplace, creating complex shapes programmatically, and significantly reducing its footprint. Feathericons is a FOSS icon library providing a beautiful SVG rendered solution for my navbar. For the favicon, or website icon, I coded it manually with the same font as the blog itself. But after different browsers took liberties rendering the font and spacing, I converted it to a path traced design. Describing each shape individually and making sure it's rendered the same consistently.

Regular vs. Inline vs Minified

If we sum up the filesizes we're looking at around 50kB of data. Luckily servers compress† our code, and are pretty good at it, leaving only 15kB to be transferred; just above our 11kB threshold. By making the code unreadable for humans using minifying scripts we can reduce the final size even more. Only... the files that make up this blog are split up. Common guidelines recommend doing so to prevent one big file clogging up load times. For us that means splitting up our precious 11kB in multiple round trips, the opposite of our goal. Inline code blocks to the rescue, with the added bonus of the entire site now being compressed into one file making the compression more efficient to end optimization at a neat 10.7kB.

The Web uses Gzip. A more performant choice today is Brotli, which I compiled for use on my server

In Practice

All good in theory, now let's see the effect in practice. I've deployed the blog 4 times, and each version was measured for total download time from 20 requests. In the first graph we notice the impact of not staying inside the Initial Congestion Window, where only the second scenario is delayed by a second round trip when loading the first page.

Scenario 1. and 3. have separate files, and separate requests are made. Taking priority in displaying the website, or the first file, but neglecting potential useable space inside the init_cwnd. We can tell when comparing the second graph, it ends up almost doubling their respective total load times.

The final version is the only one transferring all the data in one round trip, and is the one deployed on the main site. With total download times as low as 51ms, around 150ms as a soft upper limit, and 85ms average in Europe. Unfortunately, that means worldwide tests show load times of 700ms, so I'll eventually implement a CDN.

Speedtest 4 scenarios

  1. Regular (14,46kB): no minification, separate files - https://dev3.martijn.sh/
  2. Inline (13,29kB): no minification, one file - https://dev1.martijn.sh/
  3. Regular Minified (10,98kB): but still using separate files - https://dev2.martijn.sh/
  4. Inline Minified (10,69kB): one page as small as possible - https://martijn.sh/

I'll be leaving up dev versions until there's a significant update to the site

Content Delivery Network

Speeds like this can only be achieved when you're close to my server, which is in London. For my Eurobros that means blazing fast response times. For anyone else, cdn.martijn.sh points to Cloudflare's CDN and git.martijn.sh to GitHub's CDN. These services allow us to distribute our blog to servers across the globe, so requesting clients always choose the closest server available.

GitHub Pages

An easy and free way of serving a static webpage. Fork the BlogOnLemmy repository and name it 'GitHub-Username'.github.io. Your website is now available as username.github.io and even supports the use of custom domain names. Mine is served at git.martijn.sh.

While testing its load times worldwide, I got response times as low as 64ms with 250ms on the high end. Not surprisingly they deliver the page slightly faster globally than Cloudflare does, because they're optimizing for static content.

Extra features

  • Taking over the Light or Dark mode of the users' device is a courtesy more than anything else. Adding to this, a selectable permanent setting. My way of highlighting the overuse of cookies and localStorage by giving the user the choice to store data of a website that is built from the ground up to not use any.
  • A memorable and interactable canvas to give a personal touch to the about me section.
  • Collapsed articles with a 'Read More'-Button.
  • 'Load More'-Button loads the next 10 posts, so the page is as long as you want it to be

Webmentions

Essential for blogging in current year, Webmentions keep websites up-to-date when links to them are created or edited. Fortunately Lemmy has got us covered, when posts are made the first instance sends a Webmention to the hosters of any links that are mentioned in the post.

To stay within scope I'll be using webmention.io for now, which enables us to get notified when linked somewhere else by adding just a single line of HTML to our code.

Notes

  • Enabling HTTP2 or 3 did not speed up load times, in fact with protocol negotiations and TLS they added one more packet to the Initial Congestion Window.
  • For now, the apex domain will be pointing directly to my server, but more testing is required in choosing a CDN.
  • Editing this site for personal use requires knowledge of HTML and JS for now, but I might create a script to individualize blogs easier.

GitHub | ./Martijn.sh > Blog

 

Almost 10 years ago at 17, Joeri found himself in a horrifying blind spot accident. After being dragged 600m by a truck he lost an arm, an eye and most part of his other hand. Pulling through as a symbol of strength and perserverance, he's managed to have a positive influence over road safety in Belgium. Having hiphop influences and a good support group, he decided to release a single to 'Begin' his musical career.

Today marks the release of his music video, a project of passion with amazing production quality. As a friend, I've decided to share his story and debut with an international audience. Don't worry, as it's rapped in a West-Flemish dialect, even the overwhelming majority of my country doesn't understand a word. Either way, I've translated the lyrics if you're curious.

Joeri Verbeeck - Begin [Translated lyrics]


(Actually they don't know how I... [feel])

I don't know how to Begin

Just words in sentences

But the shit I've been through

You couldn't even make it up

(You couldn't make it up)

I lost a lot by the road, but I'm here to Win

(Let's Go!)

Why are you looking? Am I in a film?

(In a film?)

I'm going to work, while you all just chill?

(Just chill?)

I do more than you, with only one arm!

I'm richer in perserverance, I'm definitely not poor

But still they're staring

Am I wearing your clothes? I only have one eye!

They tell me I gotta chill, I gotta keep calm

Take your time, but they didn't tell me time flies!

(that time flies)

You can't play with me like a nintendo!

No longer stuck in that blind spot

Next page, like a new book

Nothing happens if I do nothing

Thats why when I yell, I yell good

I jump from left to right like kangaroo

Klets in the pets, in the bottle [=fles], in de drets [putting anything before -ets is a yell, meaningless on its own]

And I flex on the mass and I'm not depressed

And I stress for the test in the first lesson

I thought it was my last day

But the world is still not rid of me, yeah!

I was 17, I hadn't seen anything

Almost my last ride, it wasn't that clean

Why did I have the see the street from that close?

(Why did I have the see the street from that close)

Nobody knows how I feel

It's like love isn't meant for me

Every day overwhelmed by it all

I'm a warm person, but let's it cool

(Actually they don't know how I... [feel])

 

Questions need to be recorded in video form; either in Dutch, French, or German.

 

Despite a growing global demand for cybersecurity expertise, with 97 people falling victim to cybercrimes every minute globally, women are still significantly underrepresented in the cybersecurity field.

There is a huge demand for employees: over 800,000 new trained cybersecurity professionals are needed in Europe alone and there is a global shortage of nearly five million cybersecurity workers. Women will need to play a bigger role in this sector as life increasingly moves online and the real-world consequences of cybercrime become graver.

Currently, women occupy a slim share of the workforce in this emerging field, both in Europe and internationally. In the EU, 56% of organisations reported that none of their cybersecurity employees were women. According to the latest statistics, just 22% of the global cybersecurity workforce is made up of women.

Recognising this disparity, which is increasingly pressing against the backdrop of companies' growing hiring needs and a shortage of cybersecurity talent, the Belgian branch of Women4Cyber is working to change perceptions about cybersecurity. The global foundation aims to promote the inclusion of women in the field and attract people from different backgrounds to the industry.

Not just men in hoodies in basements

In an interview with The Brussels Times, Kayle Giroud, director of Common Good Initiative at the Global Cyber Alliance and Iva Tasheva, co-founder and cybersecurity lead at CyEn, both board members of Women4Cyber in Belgium, spoke about the importance of inclusion in this increasingly critical industry.

"Often young professionals think cybersecurity is just men in hoodies in basements, but that's not really it," Giroud said. "We need all kinds of people in cyber."

The cybersecurity professional, who works in policy to help underserved communities with their cybersecurity needs, is an example of the many different career paths that lead Belgians to the cybersecurity sector. Giroud originally studied political science and cooperation, before later joining the cybersecurity sector.

The organisation is keen to stress that not every cybersecurity position is hands-on, code-heavy and fast-paced. Hollywood has romanticised much of cybersecurity work, and while tasks such as ethical hacking and pen-testing are important, they are just small parts of an otherwise diverse sector.

"It's a whole universe. It's like medicine or economics. Behind the computers, there are always people developing, cracking, presenting. Someone needs to know how to manage all that. In cybersecurity there are very few pure IT-cyber profiles," explained cybersecurity start-up creator Tasheva.

Underrepresented

With women increasingly entering into STEM roles, and now achieving higher levels of formal education and training than their male counterparts, there is an array of opportunities in the field. Yet the two cybersecurity professionals acknowledged that there will still be significant societal barriers preventing women from joining the industry or considering it as an option.

"It starts with perception... You won't try it if you don't see other people like you thriving in it, so why would they join us?" Tasheva theorised. Giroud believes that the field is rarely presented to graduates, especially women. "Cybersecurity is not easy and not as glamorous as other professions," she warned.

Founded in 2019 by a board of both women and men, Women4Cyber aims to increase the visibility of the sector and help women with their professional development in cybersecurity skills. Notably, it offers mentorships and networking opportunities to help women coming from any sector or educational background to eventually find a cybersecurity position, or at least acquire new skills.

Women4Cyber Belgium works to raise awareness about the diverse roles available in cybersecurity, from technical positions to policy and strategy roles. By showcasing the various pathways into the field, Women4Cyber Belgium hopes to attract a broader range of talent.​ "We need people from political science, social science, psychologists… all types of profiles can make it within the field of cybersecurity," Giroud beamed.

Cybersecurity positions exist across the workforce. While most jobs exist in the banking sector, government, and public companies, other fields like NGOs and firms trying to use cybersecurity skills for social causes, such as Giroud's Global Cyber Alliance, are also looking to take on an array of bright and promising candidates.

"We see cybersecurity roles in banking, government sector, consultancies, and solution providers, but it's disproportionate. Cybersecurity follows our state of society; as we digitalise, we need to protect everything," Tasheva explained. "Cybersecurity needs to be embedded in professional career paths."

Thinking of a career in cybersecurity?

Women4Cyber Belgium is actively looking for interested candidates, such as recent graduates, those looking to retrain, or even people mildly interested in getting to know the sector, to join its regular events.

"We organise virtual coffees on Friday mornings, presentations, career advice, and experiences working in cybersecurity," Giroud said. "We organise conferences around diversity in the field, bringing policymakers and experts together. This year, we even brought in a space engineer specialised in cybersecurity," echoed Tasheva.

The cybersecurity specialists are proud of the results they have achieved through their small but expanding chapter. "Getting young professionals out of unpaid internships is my primary mission," said Giroud. Both she and Tasheva act as role models for the organisation's mentees, who take part in training and networking and who sometimes land job interviews at top companies.

"We just had 26 mentor-mentee pairs finish our mentorship programme. One person from my team participated in a hackathon on which we partnered with the European Commission. She was on the winning team. It just goes to show that diverse teams hack better," Tasheva said.

To get involved with the events, and benefit from mentorship, career networking and specialised opportunities for women looking to enter the industry, the Women4Cyber board members suggest that interested parties sign up for membership, which is just €10 annually for students. For more information, interested participants can follow the Women4Cyber Belgium LinkedIn page or visit Women4Cyber's website.

brusselstimes.com

 
Lemmydocs 7:4 – Thou shall create a blog

Features

  • Linked to a user using Lemmy’s API, no authentication
  • Host content on any instance
  • Category filters: Set one or more community as the categories
  • Easy to adapt to your profile
  • One page constraint
  • Anchor navigation and permalinks
  • Responsive
  • Dark / Light mode
  • No cookies or tracking
  • Interactive “about me”
  • No backend: serving a single lightweight page that can be hosted anywhere, including GitHub
  • HTML, CSS and ES6 JavaScript. That's it.

TODO

  • Possible compatibility issues with older iOS devices. Let me know if you encounter an issue! I'll be cleaning up the code in the meantime.
  • The only class not written by me is the markdown-html translation layer for which I'm using snarkdown. It does so using regex queries. As to not completely re-invent the wheel I've forked it for this purpose, but I'd like to write one myself.

GitHub | ./Martijn.sh > Blog

2
submitted 1 month ago* (last edited 1 month ago) by kernelle@0d.gs to c/self@0d.gs
 
Lemmydocs 7:4 – Thou shall create a blog

Features

  • Linked to a user using Lemmy’s API, no authentication
  • Host content on any instance
  • Category filters: Set one or more community as the categories
  • Easy to adapt to your profile
  • One page constraint
  • Anchor navigation and permalinks
  • Responsive
  • Dark / Light mode
  • No cookies or tracking
  • Interactive “about me”
  • No backend: serving a single lightweight page that can be hosted anywhere, including GitHub
  • HTML, CSS and ES6 JavaScript. That's it.

TODO

  • Possible compatibility issues with older iOS devices. Let me know if you encounter an issue! I'll be cleaning up the code in the meantime.
  • The only class not written by me is the markdown-html translation layer for which I'm using snarkdown. It does so using regex queries. As to not completely re-invent the wheel I've forked it for this purpose, but I'd like to write one myself.

GitHub | ./Martijn.sh > Blog

view more: next ›