I.T. minded
August 2017
T-SQL: create a lock
You can create a temporary lock in T-SQL for -for example- testing:
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:
Fail2ban: unblock an ip
Find IP Address to Unblock Log in to your server via SSH and type in the following command: iptables -L -n Look for the IP address you want to unblock / unban. Now we must find the jail name this…
Fail2ban: whitelist an ip
First, edit the config file : vi Then, check the line : ignoreip = Add now add all ip you want. Each IP or range IP must be placed here with a space. Ex: 192.168.0.1 192.168.5.0/32 Save. And restart…
HAProxy: redirect http traffic to https
Within HAProxy it is possible to redirect all http traffic to https.It is sufficient to add the following rule within the frontend section:
HAProxy: redirect http traffic to https
Within HAProxy it is possible to redirect all http traffic to https. It is sufficient to add the following rule within the frontend section: frontend incoming80 bind 10.1.1.13:80 redirect scheme https if !{ ssl_fc }
HAProxy: configure transparent proxy
If you configure HAProxy by default, the backends will receive the IP address of the HAProxy as incoming IP address. Some applications (or people) don’t want that. It is possible to configure haproxy as transparent proxy, so that the IP…