Tutorials Icon

Tutorials

Tutorials for hackers.
9 Stories
All Topics

Jef Spaleta blog.sensu.io

How Kubernetes works

If you’ve ever wondered why exactly Kubernetes is a thing OR wondered what the root problem is that Kubernetes solves, then this post from Jef Spaleta is for you.

For organizations that operate at a massive scale, a single Linux container instance isn’t enough to satisfy all of their applications’ needs. It’s not uncommon for sufficiently complex applications, such as ones that communicate through microservices, to require multiple Linux containers that communicate with each other. That architecture introduces a new scaling problem: how do you manage all those individual containers?

…Enter Kubernetes, a container orchestration system — a way to manage the lifecycle of containerized applications across an entire fleet.

CSS-Tricks Icon CSS-Tricks

Roll your own lazy loading

Even though there’s a promise of native lazy loading with the launch of Chrome 75, between now, then, and the time period for the other browsers to adopt it as well, we have to continue developing our own lazy loading implementations using JavaScript. From Phil Hawksworth on CSS Tricks:

In this post, we’ll look at an implementation that’s already been covered in brief detail in this post by Preerhi. We’re going to expand on that so you can add your own implementation of lazy loading to your site site as I’ve done on this little demo site.

Phil covers these topics…

Docker micromind.me

From Docker container to bootable Linux disk image

If you’d like to follow along with someone who “has no idea what they’re doing” to learn how to take a base Docker image made with a single line Dockerfile FROM debian:latest and convert it to something launch-able, then read on…

…messing about with things like this is the only way to gain extra knowledge of any system internals. We are going to speak Docker and Linux here. What if we want to take a base Docker image, I mean really base, just an image made with a single line Dockerfile like FROM debian:latest, and convert it to something launchable on a real or virtual machine? In other words, can we create a disk image having exactly the same Linux userland a running container has and then boot from it?

Cloud jarv.is

How to automatically backup a Linux VPS to another cloud service provider

Cloud lock-in isn’t an issue until it is — “any amount of backups are just more eggs in the same basket if everything is under one account.”

Most of the popular one-click server providers (including DigitalOcean, as well as Linode, Vultr, and OVH) provide their own backup offerings for an additional monthly cost (usually proportional to your plan). But as Nicolas learned the hard way, any amount of backups are just more eggs in the same basket if everything is under one account with one credit card on one provider.

Luckily, crafting a DIY automated backup system using a second redundant storage provider isn’t as daunting (nor as expensive) as it might sound. The following steps are how I backup my various VPSes to a totally separate cloud in the sky.

Jake Jarvis writes on his personal blog how to backup various VPS’s to a totally separate cloud provider.

Practices codeblog.jonskeet.uk

Storing UTC is not a silver bullet

This is a pretty long post from Jon Skeet on storing and converting UTC. For those interested in more of a tldr, the conclusion at the end of the post is “intended to be read in a standalone fashion.”

When I read Stack Overflow questions involving time zones, there’s almost always someone giving the advice to only ever store UTC. Convert to UTC as soon as you can, and convert back to a target time zone as late as you can, for display purposes, and you’ll never have a time zone issue again, they say.

This blog post is intended to provide a counterpoint to that advice. I’m certainly not saying storing UTC is always the wrong thing to do, but it’s not always the right thing to do either.

Gatsby dennytek.com

Building a personal site with Gatsby (part 1)

The goal of this series of blog posts is to create a personal website using Gatsby V2 from the default starter. The final website will have an index page where you can introduce yourself, a list of all blog posts, individual blog pages, tag pages listing blog posts in specific categories, and a projects portfolio page.

Here’s all the parts to this deep dive.

Part 1: Introduction and Setup
Part 2: Styling with Sass/SCSS
Part 3: Generating Blog Posts with Markdown Files
Part 4: Creating a List of Blog Posts
Part 5: Adding Thumbnail Images to a Blog List
Part 6: Adding Multiple Responsive Images to a Markdown Blog Post
Part 7: Adding Tags to Blog Posts
Part 8: Creating a Project Page from JSON data
Part 9: Pagination, Deploying to Netlify, and SEO

Check out the example repo on GitHub and preview the final website.

Babel flaviocopes.com

A short and simple guide to Babel

Just getting started with Babel? Read this guide from Flavio Copes — it’s short, so maybe 2-3 minutes to skim or 10 minutes to read.

Babel is an awesome tool, and it’s been around for quite some time, but nowadays almost every JavaScript developer relies on it, and this will continue going on, because Babel is now indispensable and has solved a big problem for everyone.

Babel is a compiler: it takes code written in one standard, and it transpiles it to code written into another standard.

Practices zachholman.com

UTC is enough for everyone, right?

Programming around time is the bane of pretty much every programmer’s existence. UTC works most of the time, but still has its flaws.

Zach Holman writes on his blog:

Programming time, dates, timezones, recurring events, leap seconds… everything is pretty terrible. The common refrain in the industry is Just use UTC! Just use UTC! And that’s correct…sort of. But if you’re stuck building software that deals with time, there’s so much more to consider. It’s time…to talk about time.

Zach includes a lot of time-related puns and whole lot of wisdom about programming time.

Linux iridakos.com

Full text searching your man pages with Elasticsearch

For those coming off the heels of The Changelog #292 where we talked with Philipp Krenn about Elasticsearch, you’re gonna wanna play around with full text searching your man pages with Elasticsearch.

This post covers:

  1. Setup an Elasticsearch instance locally
  2. Create an index for the data
  3. Feed the index with the man pages of the OS
  4. Create a search method for full text searching
  5. Full text search the man pages
  0:00 / 0:00