Stuff I'm Up To

Technical Ramblings

Sophos Mobile 9.0 — February 28, 2019

Sophos Mobile 9.0

Today saw me upgrading our Sophos Mobile Control v8 server.

Mandatory Upgrade Notice: Sophos Mobile 9.0

Dear Customer,

Please be advised that, effective April 2019, management of Android devices will cease to function with versions of Sophos Mobile older than 8.6. All instances of the Sophos Mobile management server should be upgraded to the latest version, 9.0, to ensure continuous management. Read how to easily upgrade to Sophos Mobile 9.0 and find out what’s new.

Continue reading
Chocolatey Package Manager — February 27, 2019

Chocolatey Package Manager

Using package managers is second nature in Linux, but in Windows you get free reign to go download and install anything you like from anywhere. Not a bad thing, but when you have a host of packages installed, keeping them all up to date can be frustrating. That’s where “chocolatey” comes in.

Chocolatey is a windows package manager based on Powershell. You can use it in the same sort of way you’d use a Linux repository using choco install or choco uninstall to download and install packages.

But there is a GUI. Once you have installed chocolatey just use the installer (from the command line) to install the GUI:

C:\> choco install chocolateygui 

If you then use it to install all your required programs such as 7-Zip, Git, Java SE, Notepad++, VirtualBox, inkscape, etc. then each time you visit the GUI you can just click to upgrade everything and it will go fetch and install the latest version of all the software you used chocolatey to install.

PostGIS and geoJson — February 22, 2019

PostGIS and geoJson

On with this current theme of spacial systems and mapping, one of the interesting challenges I faced was querying spacial data.

My particular problem was trying not to publish masses of polygons up onto an Esri map layer and make the data layer too cumbersome for our intended visitors purpose.

We have a lot of plots of land that we care for and needed to check that when a web site visitor clicks on the Esri map that we check to see if the location they have clicked actually belongs to a plot we manage.

Continue reading
ESRI ArcGIS — February 21, 2019

ESRI ArcGIS

Over the past few weeks I’ve entered into the world of spacial systems and mapping. We have a couple of members of staff who look after our GIS (Geographic Information Systems) that plot all kinds of spacial data onto maps for properties, water courses, streets, etc. The data they produce is used widely through many of our services, but now we’re starting to provide more interactive online mapping for the public.

ESRI ArcGIS Online

Continue reading
Apt Version Pinning — February 7, 2019

Apt Version Pinning

Today after running some apt upgrades my Laravel development environment failed to compile because of a newer version of nodejs than I currently require.

Module build failed: ModuleBuildError: Module build failed: Error: Missing binding /home/paulb/itsm/node_modules/node-sass/vendor/linux-x64-64/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 8.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
Continue reading
PHPUnit – Version Mismatch — February 4, 2019

PHPUnit – Version Mismatch

As our codebase matures we return to develop unit tests to ensure our QA process captures any code changes that may have altered the functionality of the product.

When calling PHPUnit on Windows or Linux we ran into some issues relating to the version of PHPUnit we had installed.

On Windows it was an ancient PHPUnit version 3 and on Linux It was running version 7. Neither of which were compatible with our Laravel 5.5 project which uses php version 7.0.

In order to use PHPUnit with our project we must use PHPUnit version 6 (see Supported Versions)

What I hadn’t realised is that we had installed PHPUnit both locally into the OS and with our Laravel project so it exists in composer.json and gets installed under the projects ./vendor. The version installed in the OS path is the version that isn’t compatible with our project, but because it’s in our path it’s taking precedence over our project installed version.

To run the project version we just need to be specific in how we call it.

$ ./vendor/phpunit/phpunit/phpunit
PHPUnit 6.5.13 by Sebastian Bergmann and contributors.

....F                                                               5 / 5 (100%)

Time: 345 ms, Memory: 16.00MB

There was 1 failure:

1) Tests\Unit\Finance\CostCodeTest::testApiGetCostCodes
Expected status code 401 but received 200.
Failed asserting that false is true.

/home/user/itsm/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:78
/home/user/itsm/tests/Unit/Finance/CostCodeTest.php:37

FAILURES!
Tests: 5, Assertions: 14, Failures: 1.

Gitahead — February 1, 2019