su
enter root password
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
exit
node -v
Failed and working projects, notes etc.
su
enter root password
curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
exit
node -v
If you updated to the latest version and the following error appears when you try to launch Themler please follow the instruction below:
Fatal error: require_once(): Failed opening required '[...]/administrator/includes/toolbar.php' (include_path='.:/usr/lib/php7.2') in [...]/templates/[theme_name]/app/index.php on line 25
www/Joomla_directory/templates
;/app
folder;index.php
for editing in any html or text editor;require_once JPATH_BASE . DS . 'includes' . DS . 'toolbar.php';
$prefix = version_compare(JVERSION, '3.9', '>=') ? 'sub' : '';
require_once JPATH_BASE . DS . 'includes' . DS . $prefix . 'toolbar.php';
/app/start
folder;data.php
file for editing and follow step 4;manifest.php
file for editing and follow step 4;
STEP 1. Press CTRL-H to bring up the Find/Replace Dialog.
STEP 2. Choose the “Regular expressions” checkbox near the bottom of the dialog.
STEP 3.a To add “test” to the beginning of each line, type `^` in the “Find what” field, and “test” in the “Replace with” field. Then hit “Replace All”.
STEP 3.b To add “test” to the end of each line, type `$` in the “Find what” field, and “test” in the “Replace with” field. Then hit “Replace All”.
To force a scan after a manual file transfer, for example, can be done as follows:
sudo -u [USER] php occ files:scan --all
for example:
sudo -u john php occ files:scan --all
Usage: files:scan [-p|--path="..."] [-q|--quiet] [-v|vv|vvv --verbose] [--all] [user_id1] ... [user_idN] Arguments: user_id will rescan all files of the given user(s) Options: --path limit rescan to the user/path given --all will rescan all files of all known users --quiet suppress any output --verbose files and directories being processed are shown additionally during scanning --unscanned scan only previously unscanned files
Source: https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html
To automate PDF processing, you need to grab the following first from your repository:
apt-get install git qpdf exiftool pdftk poppler-utils tesseract-ocr imagemagick-6.q16
Then, install PDF Ingest into a desired folder
git clone https://github.com/tezcatlipoca/pdf_ingest
Enter the followind folder:
cd pdf_ingest
mkdir DST
mkdir SRC
Put the files you wish to convert into SRC and type the following command:
./bulk
Wait until done, then you’re done! 🙂
After discovering that PHPMyAdmin is not suitable to dump or insert large databases, I did a quick search into how things are done by command line.
This worked well and my database was finally not corrupted. Host 1 is a cheap shared hosting provider with a few limitations regarding to internal data transfer, CPU and memory. Host 2 is a VPS with 4 cores, 4GB of memory with an overall decent data speed.
Keep the passwords ready for both hosts.
HOST 1
mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz
Copy the file over to Host 2
HOST 2
gzip -d [/path_to_file/DBNAME].sql.gz
[/path_to_mysql/]mysql -u [USERNAME] -p
Be very aware of what you are doing in the next steps since it involves a drop. And when you drop the wrong database, all that’s left is the cold sweat on your forehead.
SHOW DATABASES; DROP DATABASE [DBNAME]; CREATE DATABASE [DBNAME]; USE [DBNAME]; SOURCE [/path_to_file/DBNAME].sql;
Done.
Saucysauce and more about conditional dumping: https://www.lullabot.com/articles/importexport-large-mysql-databases
TLDR;
Prior to installing:
1. load the virtual drivers iso
2. set all interfaces to IDE, because old shit.
Directory Size:
du -csh
Note: du -h works too, but fills your screen up with text when you only want to know the size of that directory.
Compressing Directory:
tar -zcvf archive-name.tar.gz directory-name
Add date:
tar -zcvf filename_$(date +%y%m%d).tar.gz directory-name
Decompressing File:
tar -zxvf archive-name.tar.gz
Note: I always do -v as I would like to see what’s happening and it looks cool. \@_@/