Skip to content

Shvek's Blog

My developments and life's work documented.

  • Home
  • About Shvek

Sort MYSQL Query Result Randomly

Technical

To sort a table results randomly use the ORDER by RAND(); option. eg. Select * from table_name ORDER by RAND();

October 5, 2023 / 1 Comment
read more

Add Custom PHP handler for PLESK

Technical

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

September 27, 2022 / 0 Comments
read more

Add Gzip Compression to Nginx

Technical

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;

August 20, 2021 / 0 Comments
read more

Disable Right Click on Web Site

Technical
March 9, 2021 / 0 Comments
read more

MariaDB Upgrade from 5.5 to 10.5 breaks Sites with SQL error – Column No Default Value.

Technical

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

March 4, 2021 / 0 Comments
read more

Enable Antivirus on All Mailboxes on Plesk Server

Technical

To enable antivirus scanning for all mailboxes on a Plesk server run the following command as root.

January 12, 2021 / 0 Comments
read more

Repair AD DNS

Technical

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 […]

May 17, 2020 / 0 Comments
read more

Search and Remove/Delete File by Pattern/ Name or Wildcard on Linux

Technical

find . -name ‘\*_log’ -type f -delete

October 19, 2016 / 0 Comments
read more

Repair / FIX MAC HFS+ Partition on Ubuntu

Technical

Check partition label  using disk -l make sure hfstools  / hfsutils installed on Ubuntu run command as root: fsck.hfsplus /dev/sdab2  

August 11, 2016 / 0 Comments
read more

Repair Plesk Mailboxes

Technical

~# /usr/local/psa/admin/sbin/mchk –help Restore settings for all mailboxes. Usage: /usr/local/psa/admin/sbin/mchk [OPTION] OPTIONS: –without-spam restore all settings except for SpamAssassin configuration –with-spam restore all settings –spam-only restore only SpamAssassin settings Usage example: ~# /usr/local/psa/admin/sbin/mchk –with-spam

December 15, 2014 / 0 Comments
read more
Royal Elementor Kit Theme by WP Royal.