Hull Blogs

Aggregated posts from University of Hull students

Where virtualization shines - observing YHA

Last week I was on residential at a YHA hostel in the lakes, volunteering to help out with tasks and improve their facilities, it was a great trip and a break from the internet (as the hostel didn’t have WiFi available). However; despite not having networking access for the public or staff, the POS desktop was still somehow connected to the internet, with what appeared to be GuestCentrix running, a contactless payment machine and access to email. It appeared when logged in there was windows-inception with the local machine’s Windows 7 taskbar sat below the Windows 10 taskbar, showing that it was somehow connected, the blue status bar at the top gave away it was Microsoft’s remote desktop. This move has also been done by the Australian YHA (documented here) and for businesses like the YHA it’s a great idea due to the many of their properties being located off the beaten track and not reached by FTTC schemes (the nearby pub’s wifi stats: download - 0.5Mbps, upload: 0.11Mbps, ping - 167ms), if all the PCs were set up individually it would’ve taken days to download Windows 10 for example. Another advantage is keeping corporate software up to date, when the programmes used are updated they only need to be changed in one place as opposed to having to update them in their 200+ locations across England and Wales, as well as from a security perspective if you get theft of computers the data is secure as it isn’t on the device (assuming that the RDP session isn’t left unlocked of course) and customer data gets an extra layer of protection. There are many situations where just using RDP is a bit of crap idea, like when my school previously used it for all computers (even where students were using graphically intensive programmes and watching videos) which it just couldn’t handle; but in the YHAs situation for just reservation applications and basic searches it is the perfect technology. …
Read more

Unifi-ing my home network

After using a TP-Link AP for four years as a range extender for a BT Home Hub, I decided enough was enough. After two years, I decided to make the swap to DD-WRT which made the situation more bearable, despite there not being a compatible build for it. I took a leap in the dark and flashed it with the firmware for a similar access point by TP-Link, I got myself an almost zero-handoff functionality by making it spoof the BT router’s MAC address but it still needed a script to reboot it weekly, which would stop most of the random drop outs. It served us well though, and brought us up to March. In March, we spotted some UAPs on eBay, stripped out of offices at great price, so we bought two and set them up at opposite ends of the house, the actual adoption process confused me at first but I got the hang eventually. After getting the controller up and running in a docker container; managing the APs with the controller and setting up the network SSIDs, everything was working great. I decided to try WPA2-Enterprise, using my Synology NAS as my RADIUS server which didn’t work great with random drop-outs but when I switched back to WPA2 personal after a month everything was running smoothly again. These APs are pretty powerful and handle the handful of clients we have with ease. Where Ubiquiti excels even more though is their controller software which is miles ahead of anything else I’ve seen, allowing everything to be controlled through a single UI and also having a mobile app. I can see if an AP has dropped, client data usage and signal strength as well as a glance-able view of my network. I’m yet to found any real downside of using the Ubiquiti Access Points, beside their lack of 802.11AC but really we’re not really reaching the speeds of Wireless N (no FTTP yet) and the area around our house isn’t particularly congested on the channels. I’d certainly recommend the APs as once they’re set up, they pretty much manage themselves. If you’re confused setting up the UniFi AP this too, download the Unifi-Discover app from their website. Reset your Unifi using the pinhole on the back and connect it to your network It should appear in the discover app, press ‘Manage’ and inform it of your Unifi Controller (running live on a Raspberry Pi, if you want it to be always on) Use its IP and port (usually 8880 or 8081) as http://example.com:8880/inform. …
Read more

Programming Day with Harry & Nightmares with Ruby

I recently met up with Harry (@harryb0905) and we spent the day experimenting with a BlinkStick and a BBC Micro:Bit, which was pretty cool. We tried to get Jekyll installed on Harry’s laptop, which caused a bit of a hassle as it turns out when installing Ruby through Homebrew we didn’t account for the fact that MacOS itself runs a version of Ruby. After ages of fighting frantically with the error below (first dealing with the fact that OSX 10.11 brought System Integrity Protection), we realised we could solve it by installing RVM (Ruby Version Manager). Harrys-MacBook:Harry-Site HarryBaines\$ jekyll -v /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in`require' from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.2.0/lib/jekyll/plugin_manager.rb:34:in `require_from_bundler' from /Library/Ruby/Gems/2.0.0/gems/jekyll-3.2.0/exe/jekyll:9:in`<top (required)>' from /usr/local/bin/jekyll:23:in `load' from /usr/local/bin/jekyll:23:in`<main>' But once you install RVM, everything becomes plain sailing we discovered sudo curl -L https://get.rvm.io | bash -s stable --ruby then gem install jekyll and you’re done. Blinkstick script I’ve had a BlinkStick for a while, but hadn’t really purposed it but together, inspired by the BlinkStick documentation we wrote a script which authenticates with Gmail, then checks every 30 seconds to see if there’s any unread mail, if there is the LED will flash red three times. The script we created is below: https://myaccount.google.com/security#activityimport urllib import feedparser import time from blinkstick import blinkstick username = "example@gmail.com" password = "gmailpassword" \_URL = "https://mail.google.com/gmail/feed/atom" bstick = blinkstick.find_first() greenCol = "#0AFC12" class my_opener(urllib.FancyURLopener): def get_user_passwd(self,host,realm,clear_cache=0): return (username,password) def auth(): '''The method to do HTTPBasicAuthentication''' opener = my_opener() f = opener.open(\_URL) feed = f.read() return feed def readmail(feed): '''Parse the Atom feed and print a summary''' atom = feedparser.parse(feed) record = len(atom.entries) print("") print(atom.feed.title) print("You have %s new mails" % len(atom.entries)) if bstick is not None and len(atom.entries) > 0: bstick.morph(hex=greenCol) return record if **name** == "**main**": while True: f = auth() valOld = readmail(f) starttime = time.time() time.sleep(5.0 - ((time.time() - starttime) % 5.0)) valNew = readmail(f) if valOld == valNew: pass else: bstick.pulse(name="green", repeats=3, duration=100) bstick.morph(hex=greenCol) starttime = time.time() time.sleep(5.0 - ((time.time() - starttime) % 5.0)) f = auth() readmail(f) …
Read more

Why I use 1Password

I first started with 1Password back in 2013, moving to it from a physical password book which was stuffed with scribblings on different notepad paper with credentials on and shoved into the book. I discovered the app on Reddit, if I recall being highly recommended, so I downloaded it for the £12.99 it was at the time (a hefty sum) but unquestionably worth it. You can see to the my phone, old iPod Touch and the book I used to use, a reduction in bulk and an increase in portability. At the time I moved, I still used Windows so kept my passwords by my side, ready to key in manually. Today, I’m storing 500-ish items in my vault, a mix of logins, notes, IDs and more, and most importantly, I feel safe about it. Despite the app being closed source, their openness and availability to explain individual aspects of the software is unrivalled. There are fully open alternatives available such as Keypass but honestly, I trust AgileBits more as their software is updated almost daily (through the beta programmes) and the apps are made by them, not ported to different OS’ by shady third parties. 1Password has protected me from Heartbleed through its watchtower feature, alerting me which passwords needed to be changed, so I could simply go to the website, randomly generating a new password and saving it in 1Password. It moves the duty of remebering these away from me, I only have to remember the 1Password for my vault (although this should still be changed regularly). I can only talk about AgileBits in the highest regard, in the times I’ve spoken to them, they’ve responded within hours and found a quick resolution. There has however been some negative press about 1Password, in November 2015 with their old 1PasswordAnywhere format not encrypting metadata, which was a bit of a worry. This is as it meant the domains and titles of sites stored were not encrypted. However within hours there was a solution available, and the AgileBits support staff were on hand on Reddit and other social networks to let people know how to migrate if they wanted to do so before its officially patched. One company controlling everything in this respect works really well, as if a fundamental flaw was found in the keypass file format (for instance) it would take weeks, months or more for all the developers of different keypass apps to update to the new format (assuming that all the apps were still supported); this co-ordination I feel really gives the edge. Alternatively, I could’ve chosen LastPass instead, but their recent absorption by LogMeIn doesn’t fill me with hope for their future. I also don’t like using their cloud infrastructure to handle my syncing, I’d much rather WiFi or file-sync myself. …
Read more

DofE Gold Award

I recently undertook my DofE gold with my Sixth Form. My final expedition was 4 days walking the Yorkshire Dales and the walk was challenging, but certainly worth it! Here’s a video of how it went, edited by Shuck Productions and the intro made by myself (in After Effects): …
Read more

Getting Started with OwnTracks

This is a guide of home to get started with OwnTracks in Docker on Ubuntu 14.04 When I started with OwnTracks I had some trouble with the booklet as I found parts of it a tad disjointed and was a bit mixed up as there were some missing steps to get going. So here’s a quick guide to get OwnTracks installed and get going with it. I’d advise you use Docker for it as it’s simpler to get started with and can easily be updated (also it contains a MQTT broker so it’s a bit less hassle). Install Docker if you haven’t already Get the Docker repo docker pull owntracks/recorderd By default OwnTracks will make itself some self-signed SSL certs, if you have your own Certificate Authority just sign yourself one for the domain your using, if not you can quickly create one using XCA here (using this guide) or use the default provided ones if you’re so inclined. Start the docker container using the command below, but changing the following; replace /var/owntracks and /var/owntracks/log with the data directory you want (create it first using mkdir) but for this walkthrough I’ll assume you use /var/owntracks. Replace mydomain.uk with your own domain, change 192.168.1.11 to your server’s network IP docker run \ -v /var/owntracks:/owntracks \ -v /var/owntracks/log:/tmp -p 1883:1883 -p 8883:8883 -p 8083:8083 \ -e MQTTHOSTNAME="mydomain.uk" -e IPLIST="192.168.1.11" -e HOSTLIST="mydomain.uk" \ owntracks/recorderd When the container starts your data directory should populate, now kill the container using CTRL + C on the keyboard Create yourself some users by editing the /var/owntracks/mosquitto/mosquitto.acl file like this: # This affects all clients. attern write $SYS/broker/connection/%c/state pattern owntracks/%u/# user recorder topic read owntracks/# #the above line says that owntracks is allowed to view all locations to save them user nathaniel topic owntracks/nathaniel/+ # the line above say that Nathaniel can only edit own locations topic read owntracks/+/+ # the line above say that Nathaniel can view everyone's locations user phil topic owntracks/phil/+ # the line above says that Phil can only post and view his own locations # he can't see anyone elses locations Next edit mosquitto.conf # add the password file and access control list (acl) links like this password_file /owntracks/mosquitto/mosquitto.passwd acl_file /owntracks/mosquitto/mosquitto.acl listener 1883 listener 8883 # add your CA cert, web cert and private key here cafile /owntracks/cert3/ca.crt certfile /owntracks/cert3/mosquitto.crt keyfile /owntracks/cert3/mosquitto.key require_certificate false Next you need to get your users some passwords so they can actually post their location and so owntracks recorder can actually save the location so spin up the container again using the line from before then in another terminal window SSH’d in, run docker ps and copy the container ID Now run sudo docker exec -t -i container-ID-here bash You’re inside the docker container, run mosquitto_passwd /owntracks/mosquitto/mosquitto.passwd nathaniel (replace nathaniel with your user’s name) and enter your new password twice, now do this for all the users you want don’t forget creating a password for ‘recorder’, then exit by typing exit and hitting enter. Now you should be ready to go, run sudo nano /owntracks/mosquitto/mosquitto.passwd and check your password hashes are there You’re now ready to roll, so run the command below but this time you’re adding the user ‘recorder’ and the password you created for it so owntracks can record now, docker run \ -v /var/owntracks:/owntracks \ -v /var/owntracks/log:/tmp -p 1883:1883 -p 8883:8883 -p 8083:8083 \ -e MQTTHOSTNAME="mydomain.uk" -e IPLIST="192.168.1.11" -e HOSTLIST="mydomain.uk" \ -e OTR_USER='recorder' -e OTR_PASS='password' \ owntracks/recorderd Navigate to http://yourIP:8083 and you should see the OwnTracks interface Install the OwnTracks root CA cert you created on your phone and fill out all the fields in the app like the screenshot and your phone should connect and your phone will populate the location (and it will appear in the web version). Forward port 8883 through your router, if you have Dynamic DNS you can just use yourdomain:8883 to continue posting even when you’re out and about. If everything is working well, kill the container and set it to always restart (as shown below) so it will restart after reboots and the docker process being restarted. docker run \ -v /var/owntracks:/owntracks \ -v /var/owntracks/log:/tmp -p 1883:1883 -p 8883:8883 -p 8083:8083 \ -e MQTTHOSTNAME="mydomain.uk" -e IPLIST="192.168.1.11" -e HOSTLIST="mydomain.uk" \ -e OTR_USER='recorder' -e OTR_PASS='password' \ --restart='always' owntracks/recorderd Make yourself a brew …
Read more

NAS and NUC

Establishing a decent network infrastructure I started 2015 with nothing but a WD Passport 1TB drive connected to a BT Home Hub to serve our network, with its dreadfully slow read and write speeds, taking a good 30 seconds for a photo to display once selected. I intended to move my home folder over to that drive too so I could have some kind of backup for my files, but backing up the 950GB of files I’ve amassed over the years to that drive didn’t seem a fun task. I also wanted a media streamer to rid us the need of having DVDs scattered around the house in different cabinets, as I had recently convinced my family to get a Google Chromecast for each room with a TV; so we needed a high quality way of streaming to them as well as allowing us to remotely play the media when we’re out or away through PLEX. For this, I decided more hardware was needed; so I started comparison of the best NAS’ and media streamers and nearly chose the Synology DS214Play (as it does both in one) but decided to go with the Synology DS214 and an Intel NUC as the ‘Play’ model supposedly was unable to transcode (convert for devices) PLEX well as its dedicated GPU was only optimised for DS Video (Synology’s own video solution). However, the compatibility with USB tuner cards of Synology’s media player means in the future I will replace our existing BT Vision box with this to record in HD with availability in every room (playback through Plex) whenever I’m able to get an aerial cable down to there. I ordered the hardware for the end of August, so I just had time to set it up before returning to school, I first installed the WD Red 3TBs and set up the NAS with shares for family members and establishing it as the DCHP and DNS server replacing BT’s default hard-coded DNS entries on the Home Hub with my internal domain and forwarding other requests to 8.8.8.8 (priorities, right). I also configured LDAP so I can later join my Mac to the directory server and sync my home folder to it (at the moment I’m just using Synology’s ‘DS Cloud’ app to back up my folders) and VPN (which was far more inconvenient than I ever imagined it could be, but we’ll save that for another post). With the NUC, I installed a Western Digital 500gb HDD and booted from an Ubuntu USB drive, after installing and configuring Plex, Apache and numerous other services I was back to the start reinstalling Ubuntu due to a GRUB bootloader issue that prevented Ubuntu started. I created shares on the NAS that were network accessible such as one for films and TV, photos, home videos as well as home folders for each of the users. Then I enabled NFS sharing on the NAS and gave permissions to the NUC for the films, home videos and backup folder (don’t want to lose my config again!). Another useful addition was plugging my BlinkStick into the NUC and using a Python script to change the LEDs colour depending on the CPU usage (green 0-49%, amber 50-99%, red 100%) which is especially useful to see when Plex is doing resource-intensive transcoding. And that brings us nearly up to date. I’ll save the rest of the interesting and quirky set up tales for next time. …
Read more

Frog poem

Under a rock and hidden deep, There lies a frog, he’s half asleep. He dreams no dreams of kingdoms far, But of being trapped inside a jar.  He tossed and turned throughout the night, Not cold, he shivered from his fright. The jar was sealed, the air was thin, Not much air was there within.  So he gasped and strived for a breath, And bravely waited for his death.…
Read more

Code snippet test

If you want to get the first fault tree in my ExampleFaultTrees object, then the following code is for you: var exampleFaultTrees = new ExampleFaultTrees(); topNode = exampleFaultTrees.getFaultTree(0); You first need to instantiate an ExampleFaultTrees object and then you can ask it for the zeroth element in its internal array of fault trees. You can then simply call the topNode’s draw function, giving it the 2d context of the canvas as a parameter to draw to.…
Read more

Lost in translation: How to draw a fault tree

The other day I gave a workshop for the 08240 2d Computer Graphics students in the Computer Science department of the University of Hull. A number of the students were struggling with this aspect of the coursework that they were undertaking. Above is a rough video I put together of the content. I made it using a chemistry beaker holder to hold my webcam pointing down at the surface of my desk.…
Read more

Spooky Elephant releases Heartotron!

Just a quick note for now to announce the publishing of our game – Heartotron – to the Windows Store. You can preview and install it (for free!) on your Windows 8 device from the following store link: http://apps.microsoft.com/windows/app/heartotron/569d7e21-6eca-479c-8dfd-03371b5f739e Please give it a go and leave us some feedback or ideas for improvements. We have a planned update for later in the week to add new enemy types so watch this space.…
Read more

Boarding the Android Express

Today I took possession of my shiny new Samsung Galaxy Note II. My previous daily device was the Samsung Omnia 7 which was one of the debut devices of the Windows Phone 7 range. It was a close run race between the Note II and the flagship Windows Phone 8 device the Nokia Lumia 920. I mentioned before that it was a close race with the Lumia phone. Both are large, flagship devices with the Lumia being widely lauded as having one of the best cameras on a mobile phone, the best in low light.…
Read more

My DIY eGPU Project – Speed boost

This morning, some lovely person using the handle Burger commented on one of my earlier postssuggesting that if I connect the eGPU setup after boot-up is complete then I should get a significant boost due to PCIe compression. I little bit of Googling reveals a bit more detail here, but it seems that you need to have a ‘modern’ Intel integrated GPU in combination with one of a fairly narrow range of Nvidia kit.…
Read more

My DIY eGPU Project – The Hawk

Today my new graphics card arrived from eBay. It is a second hand MSI N460GTX Hawkwhich I picked up for a reasonable £79.02 including postage. This puts the running total for the eGPU project (not including bits that I had lying around) at £166.10. So how does it perform? Well you may remember that I previously benchmarkedboth the integrated graphics of my laptop and a borrowed Geforce 9600GT in the eGPU adapter with the eGPU providing a splendid 3 times increase in the 3DMark06 score.…
Read more

My DIY eGPU project – Benchmarking

Well, I have done a spot of benchmarking. Specifically using 3DMark06 and the Resident Evil 5 benchmarking tool. If you are wondering what I am talking about here is an introductionand a follow-up. I guess a brief recap wouldn’t be out of place. I have a laptop with integrated graphics. This severely limits the games that I can play. This makes me sad. I have read that I can put together an adapter that plugs in to the ExpressCard slot in my laptop that allows me to use a desktop GPU to power the graphics.…
Read more