- Open terminal
- Type
sudo nano /etc/default/grub - Find
GRUB_CMDLINE_LINUX_DEFAULT - Append
snd_hda_intel.dmic_detect=0(result line should look likeGRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0) - After save type
sudo update-grub
Step 1: Install the smartmontools package with the command “sudo apt install smartmontools”.
sudo apt install smartmontools
Step 2: Run the command “sudo smartctl -t short -a /dev/sdX” (in place of sdX, use the name of your SSD). This will run a short test that takes approximately 2 minutes.
sudo smartctl -t short -a /dev/sdX
Step 3: When the test is completed, run the command “sudo smartctl -a /dev/sdX” to display the results.
sudo smartctl -a /dev/sdX
git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules
git checkout workstation-16.2.1
make
make install
/etc/init.d/vmware start
wget -o- https://hub.unity3d.com/linux/keys/public
file public
gpg --no-default-keyring --keyring ./unity_keyring.gpg --import public
gpg --no-default-keyring --keyring ./unity_keyring.gpg --export > ./unity-archive-keyring.gpg
sudo mv ./unity-archive-keyring.gpg /etc/apt/trusted.gpg.d/
sudo apt update
sudo apt-get install unityhub
one-liner
objs.sort((a,b) => a.last_nom - b.last_nom); // b - a for reverse sort
as function
function compare( a, b ) {
if ( a.last_nom < b.last_nom ){
return -1;
}
if ( a.last_nom > b.last_nom ){
return 1;
}
return 0;
}
objs.sort( compare );
You can now directly use ?. inline to test for existence. It is called the Optional Chaining Operator, supported by all modern browsers. This will create an inline check for the null values. If a property exists, it proceeds to the next check or returns the value. Any failure will immediately short-circuit and return undefined
const example = {a: ["first", {b:3}, false]}
example?.a // ["first", {b:3}, false]
example?.b // undefined
example?.a?.[0] // "first"
example?.a?.[1]?.a // undefined
example?.a?.[1]?.b // 3
domElement?.parentElement?.children?.[3]?.nextElementSibling
To ensure a default defined value, you can use ??. If you require the first truthy value, you can use ||.
example?.c ?? "c" // "c"
example?.c || "c" // "c"
example?.a?.[2] ?? 2 // false
example?.a?.[2] || 2 // 2
If you do not check a case, the left-side property must exist. If not, it will throw an exception.
example?.First // undefined
example?.First.Second // Uncaught TypeError: Cannot read property 'Second' of undefined
?. Browser Support – 92%, Dec 2021
?? Browser Support – 92%
Node Support – v14+
sudo netstat -tulpn
sudo vi /etc/sudoers
# last line in file
username ALL=(ALL) NOPASSWD: ALL
When you have clone of the machine there is a bug that clone will have this same IP from Host-Only network after you change MAC address
to solve it please run bellow command.
sudo rm -f /etc/machine-id
sudo dbus-uuidgen --ensure=/etc/machine-id
sudo rm /var/lib/dbus/machine-id
sudo dbus-uuidgen --ensure
sudo reboot
To replace database engine on all tables for the given database. this script will prepare all the command that need to be run.
SET @DATABASE_NAME = '_database_that_you_like_to_change_';
SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM information_schema.tables AS tb
WHERE table_schema = @DATABASE_NAME
AND `ENGINE` = 'MyISAM'
AND `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;
Just copy result and run as SQL script
Recent Comments