Monday 4 September 2017

Windows 10 God Mode

Got Windows 10? Want to tweak a lot of settings in one place?

Create a new folder on your desktop and rename it "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"

Happy tweaking

Saturday 2 September 2017

Installing phonegap developer app on older devices or older versions of the developer app

You may go to the android play store and find that it tells you that the app is incompatible with your device even though you have had it installed on that device before.

Or you may find that you want to install an older version of the developer app because it worked better than the current version in the stores.

Fear not, you can download older versions from here

Monday 5 June 2017

Installing Birt on Linux

This is a simple post of how to install the Birt reporting engine on Linux. In this example I am installing on Linux Mint 18.1 but the same will apply to other versions and distros based on Debian/Ubuntu.

You can use your package manager or the command line apt-get tool.

Step 1: Install Apache2 and Mysql
Apache 2 is the web server of choice for a lot of Linux installations. Mysql is a free database engine. I would assume that these tools would already be installed on your system by the time you wanted to get birt up and running.

$ sudo apt-get install apache2 mysql-server

Step 2: Install Tomcat8
At the time of writing, this is the latest version of Tomcat

$ sudo apt-get install tomcat8

Step 3: Webapps folder
This is generally downloaded from the Birt-eclipse website (http://download.eclipse.org/birt/downloads/#runtime). Unzip the file, the folder we're interested in is the WebViewerExample, you can rename this as you wish and copy or link it under /var/lib/tomcat8/webapps/

Step 4: jdbc driver

For MySQL:

$ sudo apt-get install libmysql-java

For Microsoft SQL Server, download from SourceForge https://sourceforge.net/projects/jtds/, unzip the file, copy the jtds-*.jar file to /var/lib/tomcat8/lib

Step 5 restart birt

$ sudo service tomcat8 restart

 Additional Steps
Assuming you're using Eclipse to design the report, you will need to install the mysql driver into that, the download for the jar file is here https://dev.mysql.com/downloads/connector/j/

Wednesday 6 January 2016

MySQL Workbench Delimiter gotcha

I found a problem when working with MySQL Workbench and using a delimiter other than the standard semi colon.
The above 700 line SQL script appears to have run without error, only problem is that I have changed the delimiter to "$$" and forgotten to append that after the last statement in the script (create table). Looking closely at the result output you can see that the last statement executed was not the create table one.

So there's one thing to look out for, remember to put the last delimiter in.

Wednesday 8 July 2015

Enabling remote access for MySQL


When you install MySQL, only local access is enabled by default. Remote access is restricted in 2 ways:
In the config file /etc/mysql/my.cnf
Comment out the bind-address line:

#bind-address           = 127.0.0.1

User access

To enable the ruser from anywhere, you must use the grant command:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;

Replacing 'USERNAME' and password 'PASSWORD' with your own values of course.

After modifying the config file, you must restart the mysql service:

$ service mysql restart

Don't forget to use "sudo" (or su) if you're not logged in as root.


Wednesday 7 May 2014

Internet Explorer startup window position

One of my clients' servers that I log onto remotely had IE9 on it, being the only browser installed on that machine and being as I'm supporting a web based app for them I have no choice but to use such abomination.

I was quite annoyed in the way it always started up in the same position on the screen, quite like a postage stamp on my 1080p screen. Every time I would have to resize the window. I didn't want to maximize it as there are some icons down the left of the screen that I use to launch other things as well and a maximized IE window would cover them up.

I tried all the usual tricks to coax IE to save its window position, pressing Ctrl whilst exiting, pressing Shift whilst exiting all to no avail.

Finally I found this post from Microsoft MVP Don Varnau, basically you need to open a page in a new window, resize that, close the old window then close the new window.

This strikes me as a little odd, as a programmer I know it would take a lot more effort to program this behaviour into a system than it would to simply save the main window position on exit. What the thinking was behind that I'll never know, I can only imagine how that meeting went :-\

Tuesday 8 April 2014

Local mail in Linux and Mutt

Linux has a local mail system, it probably won't be of much interest to you in terms of day to day email since you probably have email set up with your ISP, Yahoo, Google, etc.

One thing that you may be interested in is administrative alerts that are sent to the root mailbox, invalid password attempts, results of cron jobs, etc.

I found the easiest way to view this mail is to install mutt, I'm currently running Linux Mint 16 but the process detailed below will be the same for other versions, Ubuntu, Debian and their derivatives.

Firstly install mutt:

$ sudo apt-get install mutt

Any time that you want to view root's email just type:

$ sudo mutt

You will then see the root mailbox. You might find your own mailbox is inaccessible, probably because it doesn't exist yet :-) This is easily remedied with a few simple command

Assuming your username is "jones", we create an empty file of that name:

$ sudo touch /var/mail/jones

Then we want to make sure that jones can use it, so assign ownership to yourself:

$ sudo chown jones /var/mail/jones

Now you own, you can change the permission so that only you can use it.

$ chmod 600  /var/mail/jones

Now you can use mutt yourself.