Tips and tricks
It’s sometimes necessary to execute one git command with a special SSH key rather that the one you’re running with (for example on a remote console). This can be easily done by using such command: ssh-agent bash -c ‘ssh-add /home/myuser/.ssh/github.key;…
To aggregate results from a command line and count number of results for each field, you can combine multiple tools like awk, cut, uniq and sort to obtain the expected results. For example, if you want to retrieve count of…
Need to generate the hash for a password? No need to use an online generator, totally insecure for your passwords … This simple command will ask you which string you want to hash and will return you the result after…
To limit the fragmentation of packets and optimize your network, it can be necessary to find the best MTU size to set up on your interface. In order to find this best value, you can use a simple ping command.…
In the most modern Linux systems, you will find memory-based file systems to make access to disk storage much faster by allocating some RAM space on a disk mount point. But this means that this disk area will be ephemeral…
When doing a find request on a Shell Mongo, the display is automatically paginated and you’re getting this: Type “it” for more By default, the number of rows returned is 20. But this value can easily be changed by using…
MySQL has always been one of the most used database engine for websites. Its security is really important, isolating and managing access must be taken in consideration. Hereafter are some commands to perform some checking and some updates. I will…
Need to gather or aggregate some results with MongoDB? Easy! You can use the group command over any collection to get a nice display of your results aggregated: db.collection.group( { key: { document: 1}, cond: { }, reduce: function( curr,…
First of all, you need to update repositories, and make sure you have all the needed packages ready and installed: sudo apt-get update sudo apt-get install build-essential openssl libssl-dev pkg-config Then, you can retrieve the sources from the official NodeJS…
A simple script that allows you to update massively Content-Type for files on an S3 bucket. This script is able to: Browse recursively a bucket Perform action only on files matching specific prefix Auto-detect type of file depending on its…