Tutorials Icon

Tutorials

Tutorials for hackers.
7 Stories
All Topics

Ivan Velichko 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?

read more

Jake Jarvis 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.

read more

Jon Skeet 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.

read more

Denny Tek 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.

read more

Flavio Copes 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.

read more

Zach Holman 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.

read more

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: Setup an Elasticsearch instance locally Create an index for the data Feed the index with the man pages of the OS Create a search method for full text searching Full text search the man pages

read more

0:00 / 0:00