MySQL: Calculate the free space in IBD files

If you use MySQL with InnoDB, chances are you’ve seen growing IBD data files. Those are the files that actually hold your data within MySQL. By default, they only grow — they don’t shrink. So how do you know if you still have free space left in your IBD files? There’s a query you can […]

Read more
time difference

Time difference res1=$(date +%s.%N) sleep 1 res2=$(date +%s.%N) echo “Start time: $res1” echo “Stop time: $res2” echo “Elapsed: $(echo “$res2 – $res1″|bc )” printf “Elapsed: %.3F\n” $(echo “$res2 – $res1″|bc )

Read more
ELASTICSEARCH: LISTEN ALL NETWORK INTERFACES ON CENTOS 7

ELASTICSEARCH: LISTEN ALL NETWORK INTERFACES ON CENTOS 7     y default elasticsearch listens to localhost. # netstat -na|grep LISTEN |grep 9200 tcp6       0      0 127.0.0.1:9200          :::*                    LISTEN tcp6       0      0 ::1:9200                :::*                    LISTEN        If you want to access over the network you need to edit network.host parameter /etc/elasticsearch/elasticsearch.yml  file ———————————- Network ———————————– # # Set the bind address to […]

Read more
Hotlink Protection

Enable Hotlink Protection on Apache If your WordPress site is running on Apache, all you need to do is open the .htaccess file in your site’s root directory (or create it) and add the following: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com […]

Read more
Implementing Content Security Policy in Apache

Header unset Content-Security-Policy Header add Content-Security-Policy “default-src ‘self'” Header unset X-Content-Security-Policy Header add X-Content-Security-Policy “default-src ‘self'” Header unset X-WebKit-CSP Header add X-WebKit-CSP “default-src ‘self'” You may also be interested in adding those headers: Header set X-Content-Type-Options “nosniff” Header set X-XSS-Protection “1; mode=block” Header set X-Frame-Options “DENY” Header set Strict-Transport-Security “max-age=631138519; includeSubDomains”       Along […]

Read more
HTTP Strict Transport Security for Apache, NGINX and Lighttpd

HTTP Strict Transport Security (often abbreviated as HSTS) is a security feature that lets a web site tell browsers that it should only be communicated with using HTTPS, instead of using HTTP. This tutorial will show you how to set up HSTS in Apache2, NGINX and Lighttpd. It is tested with all mentioned webservers, NGINX […]

Read more

Hit Counter provided by dental implants orange county