Check if file or directory exists, multiple ways: https://linuxize.com/post/bash-check-if-file-exists/
Articles
You can see a lot of good information for debugging and fixing errors on your Ubuntu server with journalctl and dmesg
journalctl --since "1 days ago"
journalctl --since "10 hours ago"
journalctl --since "12 hours ago" -p 3 -x --utc --no-pager
dmesg | less
dmesg -H --time-format iso| less
Resources:
https://unix.stackexchange.com/questions/50098/linux-network-troublesho…
find [FOLDER_NAME]/* -prune -mtime +14 -exec rm {} \;
This is the best option I have found so far: find . -type f -exec sed -i 's/foo/bar/g' {} +
foo is replaced with bar.
Source: https://linuxize.com/post/how-to-use-sed-to-find-and-replace-string-in-…
Also quite handy to be able to search and replace filenames.
If you have the black screen of death when trying to get back from suspend mode, you might want to check out this bug description and possible resolutions: https://bugs.launchpad.net/ubuntu/+source/plasma-desktop/+bug/1849084
Otherwise disable compositor: qdbus org.kde.KWin /Compositor suspend
Check if compositor is enabled: qdbus org.kde.KWin /Compositor org.kde.kwin.Compositing.active
Or: qdbus org.kde.KWin /KWin supportInformation
sudo systemctl stop apport
sudo systemctl stop whoopsie
sudo systemctl disable apport
sudo systemctl disable whoopsie
sudo aptitude purge apport whoopsie
Source: https://askubuntu.com/questions/1245078/woopsie-upload-all-process-cons…
A nice little guide: https://tecadmin.net/run-shell-script-as-systemd-service/
In firefox I have enabled a couple of tweaks described here for hardware acceleration: https://askubuntu.com/questions/1216192/why-is-kubuntu-using-much-more-…
Maybe more info here: https://itectec.com/ubuntu/ubuntu-why-is-kubuntu-using-much-more-cpu-th…
If you experience false characters in your mysqldump, you might want to try to set the encoding specifically. Example with latin1:
mysqldump -u [USER] -p --opt --skip-set-charset --default-character-set=latin1 [DATABASE_NAME] > [OUTPUT_FILE_NAME].sql
Check different encoding settings in mysql when using a specific database: show variables like 'char%';
More info and tips: https://www.toptal.com/php/a-utf-8-primer-for-php-and-mysql
Use "xdotool key Menu" in a global shortcut. That's it!
Currently running flutter in ubuntu 20.04.
Flutter cli doc: https://flutter.dev/docs/reference/flutter-cli
Flutter pub doc: https://dart.dev/tools/pub/cmd
KVM installation: sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager
Old info: sudo apt install qemu qemu-kvm virt-manager (Remember to enable VT Virtualization in the Bios) - run: sudo kvm-ok (to check)
If you encounter this problem when reading csv-files, you might want to try to change the encoding from UTF-8 to latin1. This worked for me when using the tolower function in R.
Pretty nice solution here with gsub (https://stackoverflow.com/questions/38828620/how-to-remove-strange-char…):
The text editor "nano" is an easy to use editor for linux etc.
Here are som great options to add:
File: ~/.nanorc
Content:
set linenumbers
set softwrap
set tabsize 4
Installation on Ubuntu 20.04
If you are running with Apache you can install from dpkg. If not, then it's probably better to install from source.
Standard packages: aptitude nano git zip software-properties-common
sudo aptitude update; sudo aptitude dist-upgrade
Web packages old sites: apache2 php5 libapache2-mod-php5 php5-cli php5-mysql php5-gd libphp-pclzip mysql-client mysql-server phpmyadmin libsasl2-modules libsasl2-modules-sql libsasl2-2 sasl2-bin libpam-mysql libfcgi-dev phpmyadmin unzip libxml2
sudo a2enmod rewrite
In the old days we all had CD-drives, but most modern computers these days don't have an optical drive. This makes things even more efficient, because you need to think smart. Some people choose to have an external optical drive, but why all the hassle when you can have a bootable USB or a bootable partition on your harddrive. There ar many guides on the internet, how to get that done manually. Again, why the hasse when we have UNetbootin, the perfect software for booting your favorite ISO's from your harddrive!
Thailand
Lek & Greg Vegan Camp Li Lamphun
-
Lamphun to Lek and Greg Vegan Camp (Nature route).
-
Secret Climb Lek & Greg Vegan Camp
-
Doi Inthanon XXL Li Lek & Greg Vegan Camp
How to find the idling revolutions screw: fhttps://www.youtube.com/watch?v=Od8W0XsRLKA
DIY |How to fix IDLING STOP | honda click v1 and Game changer: https://www.youtube.com/watch?v=W1zil6dHkyA
Many times you need to download files from the internet, specifically when you want to automate a process or two. Here is where wget comes in handy. This is a standard tool on most Linux systems.
In some cases the server you want to download from does a couple of checks, so your automation fails. You can come by that by adding a couple of switches like:
wget --user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" --auth-no-challenge URL_OF_FILE_TO_DOWNLOAD