a tumblelog
week 51, 2019

FreeBSD Find Out All Installed Hard Disk Size Information

The easiest way to find out detected hardware information under FreeBSD is go through /var/run/dmesg.boot file. This file is usually a snapshot of the buffer contents taken soon after file systems are mounted at startup time. It is not modified till system is rebooted.

Source: FreeBSD Find Out All Installed Hard Disk Size Information.

How I learned to love the terminal

Knowing your way around the commnand line has many benefits. With a bit of practice, you can accomplish many tasks much faster on the command line than using any other tool.

The command line is almost always available, unlike some GUI tools that must be installed. You can save frequently-used commands as aliases and save time. Your bash history will save your bacon at least once when you forget how to do something. When you ssh into a remote machine, such as your work station or a virtual machine in the cloud, you can use the command line instead of a slow GUI.

Source: How I learned to love the terminal, an article by Franziska Hinkelmann.

How To Make Python Wait

For many types of applications, at times it is necessary to pause the running of the program until some external condition occurs. You may need to wait until another thread finishes, or maybe until a new file appears in a directory on disk that is being watched.

In these and many other situations you will need to figure out a way to make your script wait, and this isn't as easy as it sounds if you want to do it properly! In this article I'm going to show you a few different ways to wait. I'm going to use Python for all the examples, but the concepts I'm going to present apply to all programming languages.

Source: How To Make Python Wait, an article by Miguel Grinberg.

How tracking pixels work

I often hear about this slightly creepy internet experience: you’re looking at a product online, and a day later see an ad for the same boots or whatever that you were looking at. This is called “retargeting”, but how does it actually work exactly in practice?

Source: How tracking pixels work, an article by Julia Evans.

Long Names Are Long

What I want to talk about is something I see in a lot of code that drives me up the wall: identifiers that are too damn long.

Source: Long Names Are Long, an article by Bob Nystrom.

7 Uses for CSS Custom Properties

Custom properties (also known as CSS variables) allow us to store property values for re-use in our stylesheets. If you’re relatively new to them, you might wonder when you might use them over and above preprocessor variables (if indeed you use a preprocessor). I’m using custom properties a lot in my workflow these days, and thought I would collate some of the use cases here.

Source: 7 Uses for CSS Custom Properties, an article by Michelle Barker.

What makes Python a great language?

What makes Python a great language? It gets the need to know balance right.

When I use the term “need to know”, I think of how the military uses the term. For many, “need to know” evokes thoughts of power imbalances, secrecy, and dominance-for-the-sake-of-dominance. But even in cases that may look like or actually be as bad as these, the intent is to achieve focus.

Source: What makes Python a great language?, an article by Steve Dower.

A new way to make quadratic equations easy

Many former algebra students have painful memories of struggling to memorize the quadratic formula. A new way to derive it, overlooked for 4,000 years, is so simple it eliminates the need.

Source: A new way to make quadratic equations easy.

Justin Abrahms' Emacs configuration

This is my emacs configuration, as typed in org-babel. Its a form of literate programming which is really nice in that it basically goads me into writing a better documented emacs config.

Check out Justin Abrahms' Emacs configuration.