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