22 May, 2018

Arch Linux: Guitarix Settings

Here's how to connect your electric guitar to a Linux system. In this case Manjaro (Arch Linux).

Jack connections: Qjackctl

Guitarix: note the connections between input and output.

Latex: reference to a figure / image

How to make the see page X trick

First: the figure


Now the reference to the illustration:

... see page~   \pageref{fig:XXX}

15 May, 2018

Arch Manjaro: WordPress REST API error 404

Error 404: WordPress REST API on a localhost

WordPress runs on my Manjaro distro of Arch Linux. But the REST API does not work at all. I have tried:

  • Install the plugin via git pull https://github.com/WP-API/WP-API.git 
  • Set the folder permissions to 777
  • Reset the WordPress database after pretty links disaster
  • Reinstall the plugin from git pull https://github.com/WP-API/WP-API.git
Mostly I get error 401, but sometimes it's 502.


10 May, 2018

Apache: how to use a local folder for your code on localhost

  1. Create a folder for your html
    # mkdir ~/html_root
  2. Create a symbolic link in /srv/html/
    # sudo ln -s /home/USER/html_root/ X
  3. Write your code, and test it in a browser, as in:
    # http://localhost/X/

[SOLVED] Install WordPress on a Arch Linux Manjaro LAMP Stack

Bingo! WordPress up and running on Manjaro (Arch Linux)

I followed this recipe. Found on HowToForge.

[SOLVED] Arch LAMP Server PHP Problems

At last! The LAMP stack is up and running. 

At last I found a recipe that created the ArchLinux LAMPP. 

Unfortunately you have to fight idiotic popups and similar all of the time, but the article is sane and easy to follow.

What I struggled with
PHP cannot execute the files in Arch:

* PHP 7.2.5 (cli) (built: Apr 24 2018 18:12:24) ( NTS )
* Linux XXXXX 4.14.39-1-MANJARO #1 SMP PREEMPT Wed May 2 19:03:39 UTC 2018 x86_64 GNU/Linux

MySQL is up and running, and so is Apache. The problem is probably the settings in /etc/httpd/conf/httpd.conf

Next Morning
Tried, tried, reinstalled everything from rock bottom again. No success. The instructions on the Arch wiki don't work (for me at least).

After 4 hours of struggle I gave up - installing a LAMP server should be a nobrainer, as in Ubuntu. Now I try to build ... of all things in Hell ... xampp!

After waiting more than an hour for the Xampp binaries the thing was dropped. Which was very fortunate. I have some bad experiences from previous Xampp usage ... so WTH. Don't care now.

08 May, 2018

Research WordPress REST API

Research for the next semester's classes on the WordPress REST API. 

Learn web code: WP REST API

Headless WordPress Sample
The next tutorial is more beginner oriented. From WP install on MAMP to a REST API introduction to the jSon objects - and a practical implementation of JavaScript in a theme, plus sevearal usefull plugins. The video will show how to get the jSon, but not how to implement it via AJAX. That's for "the next video". Parbleu!

Continued on Github
The videos above hinted at a solution. On WordPress I used a plugin in order to create a child theme. Then the JavaScript / jQuery was added, and I developed an AJAX solution that would fetch the jSon data.

05 May, 2018

Arch Linux: MySQL

MySQL up and running

Here's the guide that helped setting up MySQL in Manjaro. The pixi version is here:

sudo pacman -S mysql
sudo systemctl start mysqld
sudo mysql_secure_installation
mysql -u root -p