To sort a table results randomly use the ORDER by RAND(); option. eg. Select * from table_name ORDER by RAND();
Introduction
I have decided to publicly document my beliefs, thoughts and observations. These posts will range numerous topics on life, the universe, human interaction, philosophy, morality and whatever else I find the need to share when I feel necessary. The purpose of making these posts public is not to invite discussions or questions. I simply want […]
Add Custom PHP handler for PLESK
https://support.plesk.com/hc/en-us/articles/115000497853–How-to-add-a-custom-PHP-version-in-Plesk-for-Linux- Sample command : plesk bin php_handler –add -displayname 5.6.4 -path /usr/local/php564/bin/php-cgi -phpini /usr/local/lib/php.ini -type fastcgi -id 5.6.4-custom -clipath /usr/local/php564/bin/php
Add Gzip Compression to Nginx
use the following directives on Nginx config to enable Gzip compresssion. gzip on;gzip_disable “MSIE [1-6]\\.(?!.*SV1)”;gzip_proxied any;gzip_comp_level 5;gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;gzip_vary on;
Disable Right Click on Web Site
MariaDB Upgrade from 5.5 to 10.5 breaks Sites with SQL error – Column No Default Value.
Added the below to my.ini sql-mode=”NO_ENGINE_SUBSTITUTION” Source of fix: https://www.farbeyondcode.com/Solution-for-MariaDB-Field–xxx–doesn-t-have-a-default-value-5-2720.html
Enable Antivirus on All Mailboxes on Plesk Server
To enable antivirus scanning for all mailboxes on a Plesk server run the following command as root.
Repair AD DNS
So I just installed a clients new AD DC Server and then tried to add a machine to the domain with no success. DNS SRV records were missing. After searching I found this command to repair an re-add the DNS records to the server. dcdiag /fix I then reloaded the DNS Zone and restarted the […]
Data Recovery Software for Linux Software Mirrors
We recently needed to recover data for a client from a failed NAS raid. We tried everything in our arsenal and nothing worked. After a few google searches I came across Reclaime Data recovery software and it did the Job effortlessly. I can unreservedly recommend this Software to anyone that needs to do the same […]
Search and Remove/Delete File by Pattern/ Name or Wildcard on Linux
find . -name ‘\*_log’ -type f -delete