Mysql: optimize all tables in all databases
In order to optimize all databases & tables within your mysql instance, you can use the code below. You can also use a more specific script, where only the tables are optimized which have 10MB free space and 10% free space.
SLES: Search & install specific CVE
In SLES you can search & install specific CVE patches using the commands below.
Linux: “du” values don’t match “df” values.
If you do a df, and you compare those values with ‘du’, it is possible that those values don’t match. There are multiple reasons why this can happen, and one of those reasons if that files where deleted, but that the files are still in use by an application.In that case, it is possible that you need to stop/restart the
Iptables: redirect port to other IP – port
You can use the following shell commands in order to redirect a port to another port.
Linux: simulate memory usage
Using the “stress” application, you can simulate high memory usage of your system.You may use the following command line:
FFmpeg: decrease size of mp4 file
With ffmpeg you can also decrease the size (aka: quality) of a mp4 file on linux command line.You can use the following example, which will generate a +/- 5Mb file :
Jpegoptim: How to Optimize and Compress JPEG in Linux Commandline
You can optimize Jpeg images on linux command line (= reduce the size to load images faster).In order to achieve that, you can make use of the ‘jpegoptim’ application.On ubuntu/debian systems: To optimize the jpeg file:
Denyhosts: Add IP to whitelist
Create a file ‘allowed-hosts’ in the ‘work_dir’ (can be found in the denyhosts.conf file), which is /var/lib/denyhosts on Ubuntu, containing the ip.See the example below: