Addshore

It's a blog

The RevisionSlider

The RevisionSlider is an extension for MediaWiki that has just been deployed on all Wikipedias and other Wikimedia websites as a beta feature. The extension was developed by Wikimedia Germany as part of their focus on technical wishes of the German speaking Wikimedia community. This post will look at the RevisionSliders design, development and use so far.

Continue reading

Add Exif data back to Facebook images

I start this post not by talking about Facebook, but about Google Photos. Google now offers unlimited ‘high resolution’ images within its service where high resolution is defined as 16MP for an image and 1080p for video. Of course there is some compression here that some may argue against but photos and video can also be uploaded at original quality (exactly as captured) and the cost of space for these files is very reasonable. So, It looks like I have found a new home for my piles of photos and videos that I want to be able to look back at in 20 years!

Prior to Google Photos developments I stored a reasonable number of images on Facebook, and now I want to also add them all to Google Photos, but that is not as easy as I first thought. All of your Facebook data can easily be downloaded which includes all of your images and videos, but not exactly as they were when you uploaded them, as they have all of the exif data such as location and time stripped. This data is actually available in a html file which is served with each Facebook album. So, I wrote a terribly hacky script in PHP for Windows to extract that data and re add it to the files so that they can be bulk uploaded to Google Photos and take advantage of the timeline and location features.

The code can be found below (it looks horrible but works…)

I would rewrite it but I have no need to (as it works). But when searching online for some code to do just this I came up short and thus thought I would post the rough idea and process for others to find, and perhaps improve on.

BrExit

So, biggest turnout at a UK referendum with 72.2%, we have only had 3 though.

It was so close, 27.8% didn’t vote and thus 34.7% of the UK population wanted to remain and 37.5% wanted to leave. The pie chart really emphases this.

brexit pie

As for comparing the 2 referendums, the vote to join the EEC in 1975 saw 17.3 million vote join with only 8.4 million against.
With the BrExit a similar number (in the scheme of things) wanted to remain with 16.1 but with a whopping 17.4 wishing to leave.

Interestingly the turnout for the referendum to join the European Communities in 1975 and the BrExit referendum both had a higher turnout than any European Union Parliamentary election. The highest turnout for the EUP elections was in 1994 with 49.4%.

Let’s see what happens over the next 5 years!

Geospatial search for Wikidata Query Service

Geospatial search is up and running for the Wikidata Query Service! This allows you to search for items with coordinates that are located within a certain radius or within a bounding box.

Along side the the map that can be used to display results for the query service this really is a great tool for quickly visualizing coverage.

Continue reading

Wikidata Map May 2016 (Belarus & Uganda)

I originally posted about the Wikidata maps back in early 2015 and have followed up with a few posts since looking at interesting developments. This is another one of those posts covering the changes since the last post, so late 2015, to now, May 2016.

The new maps look very similar to the naked eye and the new ‘big’ map can be seen below.

So while at the 2016 Wikimedia Hackathon in Jerusalem I teamed up with @valhallasw to generate some diffs of these maps, in a slightly more programatic way to my posts following up the 2015 Wikimania!

Continue reading

Using Chrome Extension Generator for the first time

Chrome Extension Generator by yeoman is an npm package that can be used to very easily scaffold out a Chrome extension. Over the past year I have poked and prodded at a few chrome extensions, and ended up publishing one to display download counts on GitHub. I highly recommend this generator, it creates everything you need out of the box and also enables easy set-up of permissions, actions as well as auto rebuild and reload into Chrome for testing.

Continue reading

Some TLC for the first MOT

In my eyes the van was perfect, and was decently priced, so I was quick to snap it up, although naturally every second hand vehicle is going to have a few issues, some of which I missed and some which got slightly worse after the initial drive home. Below is a quick snapshot of the issues that I encountered and how I dealt with them for the MOT.

Those things that could wait

  • A handful of small scratches and a few dents, nothing to worry about.
  • The interior wood panelling had a hole in it, caused by something impacting the outside of the body, but the body had been sorted, the wood just needed fixing up, no MOT issues here.
  • When changing into 5th something made an odd sound, a small crunch, though it didn’t feel too bad, so probably not worth worrying about at this early stage.
  • One of the mirrors was slightly smashed (totally my fault). It turns out I was not quite ready to reverse this van out of the driveway I had it parked on.

Those that had to be fixed

  • The horn didn’t work at all! This is a requirement.
  • I couldn’t find reverse gear at all! I’m sure reverse functioning on a vehicle that has reverse is probably an MOT requirement.

Continue reading

sMite

sMite stands for ‘simple Mite’, which to most people still means nothing at all. Mite is a time tracking web service, and depending on how companies make use of it things can become more complicated than they should be.
smite is how I tried to tackle this complexity in less than 8 hours!

Continue reading

My new van

So I created a category on this Blog for my new van some time ago now, but I am yet to post about it at all. One of the reasons that I probably held back was at the start of this Blog I wasn’t really sure what I was going to put here. But here goes with post #1

Van Number 1I bought a van in August 2015 (9 before this post date).

It is a white short wheelbase Volkswagen Transporter 4, and of course my plan is to travel in it and enjoy the country and hopefully other parts of the world. In August it had roughly 170,000 miles on its clock, which hopefully leaves room for many many more.

Prior to this I was served well by an old 1989 / 1990 Nissan Micra 988cc hatch back (also in white), but that is now serving another master.

At the time of writing this the van has already changed in many ways, but lets save that for later posts.

Refactoring around WatchedItem in MediaWiki

The refactoring started as part of [RFC] Expiring watch list entries. After an initial draft patch was made touching all of the necessary areas it was decided refactoring first would be a good idea as the change initially spanned many files. It is always good to do things properly ® instead of pushing forward in a hacky way increasing technical debt.

The idea of a WatchedItemStore was created that would remove lots of logic from the WatchedItem class as well as other watchlist database related code that was dotted around the code base such as in API modules and special pages.

The main patches can be seen here.

Continue reading

« Older posts

© 2016 Addshore

Theme by Anders NorenUp ↑