Code for this post can be found here I was recently looking at a video about clean code and realized I’ve never tried this thecnique of software development before, despite the fact of having years of experience, at one point, that was also the case for the speaker in the video at the time he fisrt tryed Test Driven Development, so this post aims to document my first steps into this world.
This quick guide should work with any standard distribution of SSH for Linux or UNIX systems, fisrt we need to enforce that root user cannot login remotely, for that, we need to setup the service to user public-private key pair. We also need to create regula users with its own keys, let’s do that first: cd ~/.ssh/ ssh-keygen -t rsa -b 2048 -f id_rsa Running the above command you’ll be requested to input a pharsprase for your private key an confirm it, avoid leaving this blank to really protect your keys!
Expansions are a great tool in bash and there are a lot of applications as well as expantion types, from bash documentaion: Expansion is performed on the command line after it has been split into tokens. There are seven kinds of expansion performed: brace expansion tilde expansion parameter and variable expansion command substitution arithmetic expansion word splitting filename expantion The order of expansions is: brace expansion; tilde expansion, parameter and variable expansion, arithmetic expansion, and command substitution (done in a left-to-right fashion); word splitting; and filename expansion.
Recently one of my servers was complaining about having /var partition full! Found that the blame could be attributed to a los of files mysql-bin.000001 in /var/log/mysql/, each file was about 80MB. MySQL stores update queries for all databases, you can take a look with: mysqlbinlogs mysql-bin.000001 Also found in the documentation that mysql can take care of purging those files every period of time automatically adding the following to /etc/mysql/my.