Fedora – No compatible source was found for this media.

sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

After install ffmpeg

sudo dnf -y install ffmpeg

Restart firefox and try again to play videos.

Install Mysql 8 – Centos 8

sudo yum update
sudo yum install mysql-server mysql -y
sudo systemctl enable mysqld
sudo systemctl start mysqld

Now we need to set root password

mysql_secure_installation
 
Securing the MySQL server deployment.
 
Connecting to MySQL using a blank password.
 
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
 
Press y|Y for Yes, any other key for No: n
Please set the password for root here.
 
New password:
 
Re-enter new password:
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
 
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
 
 
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
 
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
 
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
 
 
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.
 
- Removing privileges on test database...
Success.
 
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
 
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
 
All done!

Support legacy auth methods

sudo nano /etc/my.cnf

Add at the bottom of the file

 default-authentication-plugin=mysql_native_password 

Restart mysql server and done!

sudo systemctl restart mysqld

Linux: /usr/bin/rm: Argument list too long

First navigate to folder where you want to delete files, do’t use “ls”, “ls -la” as it can take lot of time before it will show result, so just make sure your in correct directory before running this command as it will delete all files in that directory

find . -type f -exec rm -v {} \;

Command will find all files one by one and will delete it.

If you want to delete only specific files for example only .jpg files

find . -maxdepth 1 -name "*.jpg" -print0 | xargs -0 rm

It will search files with .jpg extension in current directory and will delete it one by one.

Best PHP IDE’s Windows/Linux and Mac OS

Sublime Text 3

The lightweight and very popular text editor supports a lot of programming languages. You can use a free version or buy a license for 80$. I think it’s a must to have editor and successfully replacing Notapad++. Responsiveness and speed is a very big advantage when you have limited ram/cpu. If out of box functionality is not for enough you can search and install packages

Visual Code
Created by Microsoft, Open Source free IDE, VS Code supports many programming languages and is lightweight enough to work on slow computers. It’s one of the best editors for JavaScript/Typescript but you will need to install extension to make it work well with PHP.

Netbeans
Created by Apache Software Foundation it’s free and open-sourced. Great out of box PHP support, greate autocomplete function, for professional PHP programmer it should be great IDE but uses a lot of resources, it can be slow and not very responsive on a slow computer.

PHPStorm
Costs 199$ the first year and also have free trails for 30 days. Considered as BEST PHP ide! It’s heavier then VS Code & sublime but it’s much more powerful than any other in this list. No matter on which PHP project you work, it feels like Phpstorm just understands your project and helping you to do things much faster. The only downside is price but if you can afford it, it’s best.

InfluxDB PHP

Install Influxdb, and start it. After start we should create user After we should edit influx config file on CentOS /etc/influxdb/influxdb.conf Find and replace volumes in http section restart influx db Now in php to insert data

$q = "test,city=".$city." population=87879879 \n";
 
$ch = curl_init();
 
curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:8086/write?db=databasename&u=username&p=password");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, substr($q, 0, -1));
curl_setopt($ch, CURLOPT_POST, 1);
 
$headers = array();
$headers[] = "Content-Type: application/x-www-form-urlencoded";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);

To read data from database

$query = "<strong>SELECT * FROM test</strong>";
 
$ch = curl_init();
$query = urlencode($q);
curl_setopt($ch, CURLOPT_URL, "http://localhost:8086/query?db=database&amp;u=username&amp;p=password&amp;q=" . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 0);
 
$headers = array();
$headers[] = "Content-Type: application/x-www-form-urlencoded";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
 
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
 
//display array
print_r(json_decode($result, true));

make sure you have changed database,username,password

ESXI 6.7 update: No space left on device

First of all we should set swap datastore

After running

esxcli software profile update -p ESXi-6.7.0-20190802001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml


[InstallationError]
[Errno 28] No space left on device
vibs = VMware_locker_tools-light_10.3.10.12406962-14141615
Please refer to the log file for more details.

What you can do is install problematic vib

esxcli software vib install -v https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_10.3.10.12406962-14
141615.vib

We are getting

Installation Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed: VMware_locker_tools-light_10.3.10.12406962-14141615
VIBs Removed: VMware_locker_tools-light_10.3.2.9925305-10176879
VIBs Skipped:

Then again we can run update and wait

esxcli software profile update -p ESXi-6.7.0-20190802001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml


Update Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true

Now reboot server and everything should be fine.

Install Steghide CentOS 6

Steghide is steganography tool to hide data in various kinds of image- and audio-files. first of all lets download RMP for centos

wget http://prdownloads.sourceforge.net/steghide/steghide-0.5.1-1.i386.rpm?download

after Download we can install it

rpm -ivh steghide-0.5.1-1.i386.rpm?download

if no error will be displayed then its ready but if error for example somthing like this

error: Failed dependencies:
ld-linux.so.2 is needed by steghide-0.5.1-1.i386
libc.so.6 is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.0) is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.1) is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.1.3) is needed by steghide-0.5.1-1.i386
libc.so.6(GLIBC_2.2) is needed by steghide-0.5.1-1.i386
libgcc_s.so.1 is needed by steghide-0.5.1-1.i386
libgcc_s.so.1(GCC_3.0) is needed by steghide-0.5.1-1.i386
libjpeg.so.62 is needed by steghide-0.5.1-1.i386
libm.so.6 is needed by steghide-0.5.1-1.i386
libm.so.6(GLIBC_2.0) is needed by steghide-0.5.1-1.i386
libmcrypt.so.4 is needed by steghide-0.5.1-1.i386
libmhash.so.2 is needed by steghide-0.5.1-1.i386
libstdc++.so.5 is needed by steghide-0.5.1-1.i386
libstdc++.so.5(CXXABI_1.2) is needed by steghide-0.5.1-1.i386
libstdc++.so.5(GLIBCPP_3.2) is needed by steghide-0.5.1-1.i386
libstdc++.so.5(GLIBCPP_3.2.2) is needed by steghide-0.5.1-1.i386
libz.so.1 is needed by steghide-0.5.1-1.i386

Need to install all dependencies

yum install "compat-libstdc++-33.i686" "compat-libstdc++-33.x86_64";
yum install zlib-devel.i686;
yum install libjpeg-turbo-devel.i686;
rpm -ivh "http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm";
yum install libmcrypt-devel;
yum install mhash.i686;
yum install "libmcrypt.i686";
root@server [/tmp]# rpm -ivh steghide-0.5.1-1.i386.rpm?download
Preparing...                ########################################### [100%]
   1:steghide               ########################################### [100%]

now you can use it for example

steghide embed -cf in.jpg -ef out.jpg -p password
  • in.jpg is file where we want to add hidden data
  • out.jpg is ready file after add is completed
  • password is pass to encrypt data

PNG/JPG Images Optimization Recursively

Optimization of PNG and JEPG images, using two different utilities first one is jpegoptim which is used to optimize JEPG images to use it recursively and optimize all of images in directory and sub directory you can use this command:

find . -name "*.jpg" | xargs jpegoptim --strip-all --all-progressive

This will strip all data and make images progressive.

PNG images can be optimized with Optipng

find . -name *.png | xargs optipng -nc -nb -o7 -full