Reading input line by line is something that seems like a basic and banal
operation, but it’s not really as basic as some higher level languages
make it out.
Let’s look at a couple ways we can do this in Bash and other languages like Python and C.
Bash
The syntax of bash always seems a bit awkward.
For this example, assume we have a file called test.txt and we want
to echo every line.
Documenting your code is incredibly important.
Not only does it help your future self understand, but it also helps others find their
way around.
This post will be talking about some of the tools developers can use to generate docs
for their projects.
The Premise Is Simple
There are a plethora of tools out there that allow you to create, organize, and serve documentation,
but they are all more or less based around the same core concept, which is this:
This game can be complicated to explain to people, but I’ll try my best. It would be impossible to say I don’t have mixed feeling about it, due to super divisive gameplay. As a whole though, I think I enjoy it more than I loathe it and despite the numerous flaws, I still come back.
The best way to describe this game to someone is “oddly satisfying”. Planning routes through rough terrain, hauling massive amounts of cargo and fighting mules that try to steal it are highlights for me personally, and are what I found to be the most enjoyable. I wish there was more of it. The tedium is unavoidable though. Once the novelty wears off and you start to go through an area time after time hearing the same lines from the prepper’s it gets super repetitive. Once you get a feel for how the BT’s work, it just becomes a roadblock to slow you down. Also the boss fights are extremely easy, but they are the best the most efficient way to clear an area out of BT’s.
I wanted to make some points on why I think it can be worth it to look at older technology compared to what is more current.
You get to learn from the mistakes/success of the greats.
You can see the limitations of technology from a certain time period compared to now and how it would be different today?
As software and hardware gets more mature, more people and more projects come to depend on it.
The new becomes the old and vice versa. Many ideas are perpetually rehashed and adapted to fit current needs.
I would encourage everyone to think about all the technology they use everyday and base their opinions on it’s merit instead of it’s age or popularity.
Do you have a low speed or spotty network connection
If you have ever tried using ssh from a device with a spotty Wi-Fi connection, you know that the experience can range from
less than ideal to downright infuriating.
Sometimes keystrokes are not sent, the latency can be brutal, and your connection may timeout.
Mosh to the rescue :metal:
Mosh is the mobile shell that alleviates the responsiveness problems that plague ssh.
Instead of using TCP, it uses UDP so your connection can persist across network changes or putting your laptop to sleep.
I have been experiencing a hard freeze on my first gen Ryzen 1700x system
which has been very annoying.
This is the kind of freeze where I can’t even drop into a virtual terminal
or do an Alt-SysRq.
This happens on both my Debian 10 and Ubuntu 19.04 installs running kernel
versions 4.19 and 5.0.0 respectively.
It would happen almost randomly but prominently when my CPU was idle and not
doing much.
There are a number really awesome tools that can be used to view and validate JSON
files right from the command line. As it turns out, one such tool is built right
into Python as the json.tool module. Usage is as follows:
If a single argument is given, it will validate the file and (pretty) print it to stdout.
This is all good and dandy, but what if I want to edit this JSON file now. I
could always write it to an output file and edit that, but that’s just extra
steps to take.
To bring this trick to another level of handiness, I added this mapping to
my vimrc.
Rsync is the ultimate tool for copying files and is loved by many people.
It offers many advantages over traditional methods like SCP or FTP which are linear file transfer tools.
Rsync checks the delta of files between the source and the destination and only transfers the difference.
Additionally it allows an option for easy compression of files before they are sent over the network.