Categories
Uncategorized

XAMPP VM extra Mount

In my previous post i created virtual folders outside the /opt/lampp structure. One downside is that I can only reach this over FTP now, since mounting doesn’t work. This is not handy for development.

But it turns out it is quite easy to add extra mount points.

First, shutdown XAMPP on your mac. Open the file $home/.bitname/stackman/machines/xampp/metadata.json.

Copy the “root” volume (including braces), and change accordingly for the ‘my-lampp’ folder we created earlier. Like this:

Do the same thing in /Applications/XAMPP.app/Contents/Resources/metadata.json

Now in the client, (ssh open terminal) change etc/exports, so vi /etc/exports and copy /opt/lampp line to new line and change /opt/my-lampp.

Now if you open XAMPP and start the machine you’ll see the extra mount point and you should be able to open it.

Using XAMPP ssh terminal, you probably need to give more permissions to /opt/my-lampp in order to create files from your host. chmod -R a+w /opt/my-lampp for example.

Categories
Uncategorized

XAMPP VM

Xampp vm is great out of the box, but let’s try to push it some more.

This is this setup:

  • Download and install XAMPP VM for Mac
  • SSH into the box (button ‘Open Terminal’ on front page). Now we have a terminal on the client. The following commands are in this terminal.
  • Create a new folder /opt/my-lampp
  • cd /opt/my-lampp, mkdir default, mkdir -p projects/project1
  • chown -R daemon:daemon my-lampp
  • Using vim, create a index.html in /opt/my-lampp/default with only text ‘default’ and /opt/my-lampp/projects/project1 with only text ‘project1’
  • Install vim: apt-get update, apt-get upgrade and then apt-get install vim.
  • vi /opt/lampp/etc/httpd.conf, uncomment ‘ Include etc/extra/httpd-vhosts.conf’ (remove #).
  • Save 😡
  • vi /opt/lampp/etc/extra/vhosts.conf and match the following. Be careful , these settings will also prevent 404’s when using laravel etc. So don’t skip directory permissions.

save using 😡

Now edit ftp settings. vi /opt/lampp/etc/proftpd.conf and change /opt/lampp/htdocs to /opt/my-lampp (file contains 2 entries)

On your host (your mac, not the xampp terminal), create a mapping for dev.project1 in /etc/hosts. You need ‘sudo vi /etc/hosts’.

My Xampp runs on 192.168.64.4 (yours might end different, Xampp shows IP on ‘General’). Add one extra lines in /etc/hosts for the new sites.

Now from host restart the services (services tab in Xampp)

Browse to http://192.168.64.4, this should show ‘default’. Browse to http://dev.project1. This shows ‘project1’. You can add more and more virtualhost projects to the server using the same procedure.

Install filezilla and create a new connection to 192.168.64.4:21. User daemon, password xampp. You will land into /opt/my-lampp as the root of the ftp.

Lets install wordpress. Download and unpack wordpress. Connect Filezilla and put the unpacked wordpress inside /default. When uploading is finished, wordpress to the name of your site.

Browse to localhost:8080 (enable Network->port forwarding in Xampp) and go to phpmyadmin. Create a database.

Browse to http://dev.default/wordpress. Install. DB user is root, password will be empty. Just enter the info and you’re done.

Categories
Uncategorized

Jasper Report Server 7.1 no login FF and Chrome (i18 issue)

I was giving Jasper Report Server 7.1.1 a try for the first time. But after installing, the login button was not working. So I had a look, and chrome shows that a “dateTimeSettings” file could not be downloaded (500).

I went to Firefox. Same thing. But Internet Explorer was working, and the file could be downloaded. I started to look for logs and finally found something in “./jasperreports-server-cp-7.1.1\apache-tomcat\webapps\jasperserver\WEB-INF\logs\jasperserver.log”

java.lang.RuntimeException: Settings has incorrect format: /* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
jQuery(function($){
	$.datepicker.regional.nl = {
		closeText: 'Sluiten',
		prevText: '←',
		nextText: '→',
		currentText: 'Vandaag',
		monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
		'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
		monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
		'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
		dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
		dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
		dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
		weekHeader: 'Wk',
		dateFormat: 'dd-mm-yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional.nl);
});

Internet Explorer is sending nl-NL as first language which doesn’t exist and falls back to ‘en’ which is working. While FF en Chrome send ‘nl’, so that was the difference and causing issues. Now I started looking at the particular files that contain these settings. I found them in “.\jasperreports-server-cp-7.1.1\apache-tomcat\webapps\jasperserver\scripts\bower_components\jquery-ui\ui\i18n”.

I compared the dutch “jquery.ui.datepicker-nl.js” with the english version. There I saw that the initialization format was a bit different ($.datepicker.regional[‘en’] vs $.datepicker.regional.nl). So I modified accordingly. Now chrome and FF also work. Watch out, these files are actually on two different places inside the installation. Make sure to correct the right one in the folder I mentioned.

/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
jQuery(function($){
	$.datepicker.regional['nl'] = {
		closeText: 'Sluiten',
		prevText: '←',
		nextText: '→',
		currentText: 'Vandaag',
		monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
		'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
		monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
		'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
		dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
		dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
		dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
		weekHeader: 'Wk',
		dateFormat: 'dd-mm-yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['nl']);
});

I will try to create a bug report for Jasper Report Server, but their account creation is’nt sending me a confirmation email which i need.

Categories
Uncategorized

Blender even thickness inset

When you apply an inset on a rectangular plane that is scaled, the inset width along x will differ from the inset width along y

If you want an even thinkness, you need to apply the scaling before using inset (I). Than inset width will be the same on all axis.

What happens during “Apply->Scale” (edit mode) can be explained by an example. A plane with size x=1 and y=1 and scale y=2 would look rectangular. But is actually the scaling applied to y=1. During “apply scale”, the size is recalculated based on the scale. So in this case: size x=1 and y=2 and scale will be reset to y=1.

Categories
Uncategorized

Locally backup and restore Docker images

Store:

Restore:

Categories
Uncategorized

Quark modify resources

In Quark Xpress or Copydesk (I am using 2015) it is not possible to modify any keyboard shortcuts from a configuration. And sometimes that is really anoying.

Luckily it is possible to modify the resources in the .exe or, if you have a language specific configuration, one of the Language___.dll’s.

The program I use is Resource Hacker: http://www.angusj.com/resourcehacker/

When you start that, it is possible to open the QuarkXpress.exe (or Copydesk, or the Language___.dll’s)

First lookup the menu item you want to apply the keyboard shortcut to (look in the first node from the ‘MENU’ folder on the left). Especially the number that comes after the name of the menu item. Eg. 810 is the number for Guidelines.

Then look for ‘Accelerators’ on the left. In case of copydesk i needed to open node 500.
Look for VK_F7 and apply one of the options for 810, if it is not there add it and copy the commands from another key.

Make sure you don’t create conflicts!

Then compile and save.

Categories
Uncategorized

Eclipse Che on Arch

Eclipse Che is a Cloud IDE that you can install on your server.  I will try to use it from my iPad Pro.

Make sure you have docker installed and the service started:

My home server IP is <IP_HOST>

On my home server I created a folder ~/Che

Now start:

Now I can start CHE from a browser (also from iPad). Data is stored in ~/Che

Use: http://<IP_HOST>:8080 from a client to start the che cloud workspace.

Categories
Uncategorized

Docker service not starting on Arch Linux

I had some problems starting the docker service on Arch after installing docker.

This resulted in an error and the message told me to look at journalctl -xe

The output wasn’t very helpful.

gave much more info, such as:

What to do? Well, did you do a linux upgrade before installing and starting docker?
Just reboot 😉 In my case I did a linux upgrade and didn’t reboot before installing docker.

R E B Ó Ò T

Categories
Uncategorized

Docker remove containers

So you want to remove containers. The tutorials use the command:

This doesn’t work if your user is not part of the ‘docker’ group. You will get a nasty Permission Denied message. So hey, let’s sudo.

ouch! this doesn’t work either. Same message. What is happening? The line contains two commands:

AND

So let’s try this:

That works.

Categories
Uncategorized

Installing Arch Linux

A colleague told me about Arch Linux. Since I am really a DIY kind of guy, I decided to give it a try.  It is different from something like Ubuntu. It’s small and comes without a pre-installed desktop. It has no version since it is a rolling-release. Installing is a bit more more complicated than something like Ubuntu or CentOS but not that complicated. I will be assuming a UEFI installation.

Prerequisites

  • Computer, x86_64 with a minimum of 512mb RAM.
  • 2gb usb drive
  • Working internet connection.

Tools needed