10 June, 2018
03 June, 2018
Gmail Becomes Useless
![]() |
| Google tracking me via mobile devices |
Now - every time I try to log into my gmail account Google wants to send an SMS with a code. Now this may look as if it's security, but in reality it is spying on the user. Since I don't have my mobile next to me all the time, the gmail account will become too cumbersome to use. So now I think the time has come where I will stop using gmail.
If I cannot log into my account without a mobile device gmail becomes useless.
22 May, 2018
Arch Linux: Guitarix Settings
Latex: reference to a figure / image
How to make the see page X trick
First: the figure
\begin{figure}
\includegraphics[width=\linewidth]{images/at-i.jpg}
\caption{XXX}
\label{fig:XXX}
\end{figure}\index{XXX}
Now the reference to the illustration:
... see page~ \pageref{fig:XXX}
First: the figure
\begin{figure}
\includegraphics[width=\linewidth]{images/at-i.jpg}
\caption{XXX}
\label{fig:XXX}
\end{figure}\index{XXX}
Now the reference to the illustration:
... see page~ \pageref{fig:XXX}
16 May, 2018
15 May, 2018
[ SOLVED ] 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.
Ideas?
---
A fellow lecturer suggested to edit /etc/httpd/conf/httpd.conf :
Quote from this page:
---
A fellow lecturer suggested to edit /etc/httpd/conf/httpd.conf :
Quote from this page:
"When the server finds an.htaccessfile (as specified byAccessFileName), it needs to know which directives declared in that file can override earlier configuration directives.
Only available insections
AllowOverrideis valid only insections specified without regular expressions, not in,orsections.
When this directive is set toNoneandAllowOverrideListis set toNone, .htaccess files are completely ignored. In this case, the server will not even attempt to read.htaccessfiles in the filesystem.
When this directive is set toAll, then any directive which has the .htaccess Context is allowed in.htaccessfiles."
After that a directory as added that pointed to WordPress:
AllowOverride All
AllowOverrideList All
Require all granted
AllowOverrideList All
Require all granted
In a WordPress forum an author suggested to change the permalinks to "post name". The .htaccess file had to be created, with this content:
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
After a restart of Apache the REST API responded correctly:
# sudo systemctl restart httpd
In order to install themes and plugins the owner of the folders should be the Apache user http, so:
# chown -R http:http wordpress/
And so the WordPress installation is ready to fly on the localhost.
10 May, 2018
Apache: how to use a local folder for your code on localhost
- Create a folder for your html
# mkdir ~/html_root - Create a symbolic link in /srv/html/
# sudo ln -s /home/USER/html_root/ X - 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.
- I used this tutorial.
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!
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.
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!
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!
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
02 May, 2018
XFCE Create Program Launcher
01 May, 2018
Spotify on Arch Manjaro
![]() | ||
| Spotify on Arch Manjaro. Dylan's Knocking on Heaven's Door seems strangely appropriate. |
Spotify is up and running. Since the package is from a Debian based distro Snap is a solution (read: "the solution")
# snap find spotify
# snap install spotify
and then
# snap run spotify
Now the only thing I need is a file that will launch the app with a nice icon for the desktop. But that's for tomorrow.
First things should go first. Because in order to run snap you have to install snap. In case you don't have it:
# pacman -S snapd
It's time to try a new distribution
![]() |
| The Manjaro XFCE desktop with my keyboard bokeh as background. |
Now I run the new kid on the blog Arch based Manjaro distro with a XFCE desktop. It's a superfast system with a lightweight distro on a decent PC.
Manjaro use the Linux 4.14.36-1-MANJARO GNU/Linux kernel. Updates are rolling.
Installing Manjaro
- Unplugged the /home drive (a 2TB harddisk)
- Installed Manjaro on the SSD stardup disk
- Added a user
- Replugged /home disk
- Followed this guide
# blkid
Then /etc/fstab was edited and this info was added:
# UUID=b87ebb56-f4df-43ee-918a-fa69xxxxxxxx /home ext4 defaults 0 2
A nice surprice
After a reboot the system was up and running. To my surprise the users could access their shares immediately. And a very pleasant surprise was the fact that even shortcuts from Nautilus was preserved and ready for use in the XFCE file manager Thunar.
Even symbolic links to certain shared folders were preserved.
SSD - contemplating more real estate
Well my 120GB SSD ran full after an Ubuntu SQL update of some kind. I tried to solve the problem by a new install, but Ubuntu was not able to do a decent dist-update.
After several crashes I decided that enough was enough. So I droppedUbuntu (for a while I guess ...)
The real problem isn't Ubuntu but the fact that the SSD should have more GBs. I guess that it is necessary to follow the development on the boot drive or to update the hardware.
25 April, 2018
Ubuntu up and running
Strange. Almost gave up on Ubuntu. But next morning it was just:
apt update && apt upgrade
apt dist-upgrade
reboot
... and BINGO - the thing just worked as a charm.
The next step will be add the harddrive with the user data and configure the user access but that's not for now.
apt update && apt upgrade
apt dist-upgrade
reboot
... and BINGO - the thing just worked as a charm.
The next step will be add the harddrive with the user data and configure the user access but that's not for now.
24 April, 2018
[Solved] Ubuntu crash
Today Ubuntu crashed after an update. The / drive was overfull, and there was no way I cold delete anything. Tried to install Linux from the original 16.10 disk. But then it was impossible to update. I tried sevearal installs, but every time something went wrong.
Now I'm fed up with Ubuntu. Perhaps this is the time to change the distro?
My head is full of four-lettered words, and most of them end with ck ... Right now Ubuntu behaves a bit like ... oh horror ... Winslows.
Now I'm fed up with Ubuntu. Perhaps this is the time to change the distro?
My head is full of four-lettered words, and most of them end with ck ... Right now Ubuntu behaves a bit like ... oh horror ... Winslows.
17 March, 2018
11 March, 2018
Mac and Linux
It's easy to integrate Mac and Linux. Just use the SSH protocol, e.g.:
- SSH - for a connection.
- SFTP - for file transfer.
- SCP - for file copying.
Backups - use:
- RSYNC
10 March, 2018
Hvor er Applescript Editor på dansk Mac?
Den er godt nok svær at finde; men en eller anden oversætter har valgt at kalde Applescript Editor (også kaldet Script editor) for:
Instruktionsværktøj
Oversættelsen kan være korrekt; men det er godt nok ikke nemt at gætte. Bedre oversættelse ønskes!!
05 March, 2018
Speed up Gthumb
Importing pictures via Gthumb can take a while. If you limit the import to JPEG it will be faster. If you want to edit a RAW, you'll know the filename. So import that file.
15 February, 2018
Macbook Pro in the Classroom
So I headed to the classroom with my brand new MacBook Pro. It's a wonderfull laptop, but again the good developers from Mac had a surprise in the sleeve.
I could not use the projector!
Of course you have to buy new wires in order to do something as mundane as showing your screen to a class on a MacBook Pro. It is ok to use whatever slugs Mac fancys, but it is not ok that we have to buy new connectors every time we buy a new Mac!
Well ... on a Mac you're always the creative guy. I had to use a whiteboard, and the students had to watch the code samples on my Github repos on their own devices.
I could not use the projector!
Of course you have to buy new wires in order to do something as mundane as showing your screen to a class on a MacBook Pro. It is ok to use whatever slugs Mac fancys, but it is not ok that we have to buy new connectors every time we buy a new Mac!
Well ... on a Mac you're always the creative guy. I had to use a whiteboard, and the students had to watch the code samples on my Github repos on their own devices.
12 February, 2018
How to use Emmet in Brackets on a Mac
It's hard to find anythin on this topic: how do you write alt+ctrl+enter on a Mac. Of course the solution is:
alt+ctrl+enter = TAB on a Mac!
To be honest, I like this solution, it's simple and resembles what you do in the terminal window. 5 points for Mac here.
alt+ctrl+enter = TAB on a Mac!
To be honest, I like this solution, it's simple and resembles what you do in the terminal window. 5 points for Mac here.
11 February, 2018
[Solved] Emmet in Brackets on Ubuntu
I could not install the Emmet - or other plug ins - in Brackets. The problem was the packet manager Snap. I had to remove the snap for brackes, and deleted all files related to Brackets manually. Then I downloaded the .deb package for Brackets and installed the thing. Now everything was OK, and I could install the Emmet plugin.
And Emmet is sooo cool.
And Emmet is sooo cool.
Subscribe to:
Posts (Atom)










