Thursday, 28 April 2016

How to stop google maps moving

It's annoying when you have a google map on a website and you try and scroll by it, but end up dragging it on mobile.

Well a solution!

In the gmap.js there is a function call called setOptions, in the parameter passed set 'draggable' : false, and that does the trick.

Saturday, 23 April 2016

Preventing a Denial of Service attack on Wordpress

Preventing a DoS or Denial of Service attack on Wordpress is hard. These are the steps I took to prevent / stop a huge amount of traffic to Wordpress site which was causing it to crash after just a couple of minutes.

1. "yum list updates" - check to see if the Linux server is up-to-date
2. "sudo yum update" - make sure the Linux server is up-to-date
3. "yum install fail2ban", the config file is located here; "vi /etc/fail2ban/jail.conf"
4.  Install fail2ban wordpress plugin
5. "sudo curl https://plugins.svn.wordpress.org/wp-fail2ban/trunk/wordpress-hard.conf > /etc/fail2ban/filter.d/wordpress.conf" you may have to create is locally and do another sudo to move it in.
6. Edit the "/etc/fail2ban/jail.d/wordpress.conf" file as follows;

[wordpress]
enabled = true
filter = wordpress
logpath = /var/log/auth.log
port = http,https

7. Restart the fail2ban service; "service fail2ban restart"
8. However if you've auth protected Wordpress this may not be enough so do the following;
9. in the jail.conf add the following;

[http-get-dos]
enabled = true
port = http,https
filter = http-get-dos
logpath = /var/log/httpd/access_log
maxretry = 300 
findtime = 300
#ban for 500 minutes
bantime = 60000
action = iptables[name=HTTP, port=http, protocol=tcp]



[http-post-dos]
enabled = true
port = http,https
filter = http-post-dos
logpath = /var/log/httpd/access_log
maxretry = 15
findtime = 300
#ban for 500 minutes
bantime = 60000

action = iptables[name=HTTP, port=http, protocol=tcp]

10. Create a ttp-get-dos.conf file

# Author: http://www.go2linux.org
#
[Definition]

# Option: failregex
# Note: This regex will match any GET entry in your logs, so basically all valid and not valid entries are a match.
# You should set up in the jail.conf file, the maxretry and findtime carefully in order to avoid false positives.

failregex = ^ -.*GET

# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#

ignoreregex =

11. Create a ttp-post-dos.conf file

# Author: http://www.go2linux.org
#
[Definition]

# Option: failregex
# Note: This regex will match any GET entry in your logs, so basically all valid and not valid entries are a match.
# You should set up in the jail.conf file, the maxretry and findtime carefully in order to avoid false positives.

failregex = ^ -.*POST

# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#

ignoreregex =


12. Restart the fail2ban service; "service fail2ban restart"

That should start blocking those nasty DoS attacks quite well.

References
http://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
https://www.maketecheasier.com/fail2ban-protect-apache-ddos/ - protect against DDoS

Sunday, 2 August 2015

ApplePay and saving money at Lidl versus Tescos

Just shopped at Lidl for the first time. Firstly, was really impressed with range and quality of produce and fresh produce that they had. What blowed me away was how much cheaper it was than Tesco!

Just take a look;



I saved £5, on a £20 shop in Tesco it only cost me £15 at Lidl, very impressive that is a 25% saving. If I did that each week for a year that would be about £300 a year saved! Or on a £100 shop, I'd be saving £25.

Wow.

And they accepted ApplePay.

And it worked perfectly!

Friday, 31 July 2015

ApplePay anecdotes

So I almost ran into the AppleWatch ApplePay, ran out of battery fail at mignight on Wednesday.

However before I went through the barriers to the overground train I discovered my last train had gone. Between there and the tube my AppleWatch ran out of juice! Lucky I had not swiped in!

Therefore I had a chance to use ApplePay on the iPhone 6 Plus. I didn't realise the NFC field would activate it, so I opened Passbook and fiddled for a while, as I couldn't work out how to make the card ready.

So I just placed it on the contactless reader on the gate and put my finger on the scanner. It took a while and was rather cumbersome, but it did work, and on the other end too.

Love the AppleWatch ApplePay tibe/overground/tfl experience, but I shall be avoiding doing it on my phone whete possible.

Monday, 27 July 2015

Setting up new ApplePay card

After HSBC failed to launch ApplePay, I opened a Santander mastercard account. Today I got back from holiday and setup & activated my new credit card.

Pre-ApplePay, because it was a new card; I did a PIN transaction, then a contactless transaction, and only then did I add it to passbook.

Adding to iPhone Passbook was seamless, adding to AppleWatch, slightly more difficult. To add to AppleWatch you have to go via the AppleWatch app on the iPhone. On adding the Santander card, it did not appear on the AppleWatch, even after making it default.

An iPhone reboot did not resolve the issue.

Then I tried turning the AppleWatch off and on again. And just like that; it suddenly appeared on the AppleWatch. 

I then tried paying with the double click AppleWatch ApplePay - frictionless, wahoo!

Thursday, 16 July 2015

Hidden feature for ApplePay in AppleWatch!

Quick post; just discovered you can double tap the side button on AppleWatch - the one that usually brings up friends/favourites/contacts, and you have your ApplePay card ready and active immediately.

OMG so convenient, this is the killer feature. No more navigating to Passbook, or using Siri to "Open ApplePay".

Monday, 1 June 2015

Create your first Apple Watch App in Xcode

I had to upload to the latest Xcode for this to work.

Then you go to the main project settings window, click the + and add a new Apple Watch app, and mark all views (including glances).

Then add a label to the storyboard so you can see something output.

Then run the app, in simulator you can see the Apple Watch, by going to hardware > Apple Watch.

To run on your phone, you choose the WatchKit app schema to run, and choose your phone. The latest xcode will fix any signing and provisioning profile issues. If it does not, close Xcode and load it again, especially if it says that the Watch is not paired.

That's it, first Apple Watch App working.


Sunday, 24 May 2015

Migrating AWS EC2 WordPress install to micro instance issues

After migrating my AWS (Amazon Web Services) EC2 instance from small to micro - in order to stop getting charged for it. I found all the urls were pointing to the old domain.

On the face of it, this looks like a Linux hostname issue, and I spent a while setting up the ssh access to the box and searching for the hostname or server name - what I found turned out to the be private hostname / ip address, and therefore wasn't causing the issue.

I suddenly had a brain wave that maybe it was stored in the DB.

I then found I could login to the DB using the 'mysql --user=username --password=password' command. This allowed me to login.

I then found the schema for wordpress; https://codex.wordpress.org/images/9/97/WP3.8-ERD.png



Which I made a guess that it was the wp_options table.

I then did select * from wp_options, and put the result in a text editor and searched for the old domain name, and there it was under the option_name 'home' and 'siteurl'.

So I then used the following two command to update those values;

mysql> select * from wp_options where option_name = 'siteurl';
+-----------+-------------+-----------------------+-----------+
| option_id | option_name | option_value      | autoload |
+-----------+-------------+-----------------------+-----------+
|         1      | siteurl       | ***URL**              | yes          |
+-----------+-------------+-----------------------+-----------+

update wp_options set option_value='http://newdomainame/wordpress' where option_name='home'

update wp_options set option_value='http://newdomainname/wordpress' where option_name='siteurl'

And ran a commit for luck, and it all started working again.



Friday, 13 March 2015

Designing Your Future with the Connected Car

The company Frog Design are currently hosting a session on "Designing Your Future with the Connected Car".

It was good to meet the leads from Frog; Cobbie and Michael.

The introduction circled around the goals of the session; exploring User Centred Design, and the Connected Car.





What is the connected car?



It's predicted by Telefonica that by 2010, 90% of all new car sales will be for connected cars.

What are connected cars;

- Wirelessly connected
- GPS
- Sensors
- HCI / HMI changes
- Wearables
- BIG data
- Machine Learning
- AR

Apple's Car Play, Google's offering and lots of other tech companies are trying to get into the in vehicle space. And lot's of car companies are trying for the self driving car.

User Centred Design

The session then focussed around the human element of cars - that everyone has a car story and interactions with cars are an emotional experience.

What are the needs / issues we are trying to solve with technology?

A process they follow is;

1) User research
2) Synthesis and brain storming
3) Storyboarding the best concept(s)
4) Illustrating the idea with a photo prototype
5) Pitching the idea

Idea in and around the connected car

Makes lives safer
- Proximity sensing
- Object identification and response / avoidance
- V2V comms

Show us the way
- Nav-D project on the road
- Search a map
- AR overlay on road / ghost car

Save Time
- Sync device e.g. nest
- Self parking
- Self driving cars

Make life richer
- In car comms
- Ride sharing
- Spaces / places to connect e.g. CES Mercedes swivel chairs

Help us explore
- Podcasting
- Exploration tools / road trips
- Contextual interfaces

Knowing us
- Personality & name for the car
- Driver (and passenger) emotion monitoring
- Health monitoring / biometrics
- Awareness and AI e..g Google car that looks 'adorable'.

Some of the Tech involved















Monday, 26 January 2015

Business tech creation weekend

This weekend I did plenty of tech delivery;
 
1) Added article to Kevsweb on friends new website http://www.kevingordon.org.uk/articles/prittlewell-ringing-centre.html

2) Rebuilt the following website as a responsive design http://www.mrchhoystuktuk.com meaning it looks good and works well on mobile and tablet, as well as desktop

3) Built to further responsive proof of concepts





4) Built an augmented reality business card

5) And lot's of app development planning



Saturday, 17 January 2015

New website design business

As a new year's resolution I have decided to start up a web design business; http://www.digitaltechnologylabs.com

Sevices offered include web design and build.
Bespoke software built
App development
Augmented Reality expertise
On-line marketing
Social media setup

Wish me luck

How well did I predict the iPhone 6?

Want I wanted  to see;
  • Larger form factor & bigger screen - check
  • Better camera - check
  • Faster wireless mobile / cellular data capability - check
  • Enhancements to Siri - check
  • Better battery life - check
  • Faster processor / more memory / better graphics - check
  • Additional multitasking functionality / dual screen functionality - check
  • More reliable / robust / less buggy / lower failure rate - ?
  • Beautiful new design - check
  • Smart bezel to have some interactivity with the bezel of the device with the screen - nope
  • Larger choice in colour? - nope
  • Better quality speakers / higher volume capability - ?
  • Reversible USB / Lighting connection - yep
  • Enhancements to the iBeacons technology / reliability / frequency reading capability - ?
  • NFC capability to enable the digital wallet in your phone - nope

Not bad, most of my predictions were correct!

Sunday, 24 August 2014

iPhone 6 predictions

Want I'd like to see;

  • Larger form factor & bigger screen
  • Better camera
  • Faster wireless mobile / cellular data capability
  • Enhancements to Siri
  • Better battery life
  • Faster processor / more memory / better graphics
  • Additional multitasking functionality / dual screen functionality
  • More reliable / robust / less buggy / lower failure rate
  • Beautiful new design
  • Smart bezel to have some interactivity with the bezel of the device with the screen
  • Larger choice in colour?
  • Better quality speakers / higher volume capability
  • Reversible USB / Lighting connection
  • Enhancements to the iBeacons technology / reliability / frequency reading capability
  • NFC capability to enable the digital wallet in your phone
Let's see how many of the items I get right!

Monday, 26 May 2014

It's been seven months since my last post

Wow, it's been 7 months since my last post.

Since then I've been in a new role looking at things like Augmented Reality (Aurasma), Virtual Reality (Oculus Rift), app development (iOS / Objective C), and much much more. It's been fabulous, but has also taken up all my time, so my digital blogging has fallen by the way-side.

Additionally I helped setup and support several events this year, including the First FordStore, the Ford Go Further Event in December, the Geneva Motor-show, Ford's presence at the Mobile World Congress in Barcelona, the UCL Champions League Festival in Lisbon, Portugal and many smaller events in Barcelona & Germany.

The job is quite phenomenal, and as the assets I develop get rolled out around Europe I'll be blogging about them.

Sunday, 6 October 2013

www.kevingordon.org.uk - Kev's Web re-design

Here is an early design of www.kevingordon.org.uk;


It evolved from that, and I dropped the Sonic image at the top and replaced with a different header. Since 2010 I had a new design for the site planned, see the sketch below - it was based on a website I saw that I really liked;


So this month (October 2013) I finally got round to making the changes to the website, and this is what it looks like;






Friday, 4 October 2013

Internet and Raspberry Pi enabled model railway @ kevingordon.org.uk

I have been busy writing up my Raspberry Pi project, which is an internet and Raspberry Pi enabled model railway, see it here at http://www.kevingordon.org.uk/articles/raspberry-pi-railway-web-controlled.html In this article you will find the follow;


  • The process I went through to create the project
  • The source material
  • The architecture diagrams of the design as it developed
  • The source code, both for the Raspberry Pi (python) and server-side (PHP)
  • Videos of the railway working at different stages/progress of the project
  • Other relevant images
  • The XpressNet API guide for download
I hope you enjoy, would love to hear if you use this to base your own project off of!

Monday, 30 September 2013

TheNotebookStore pilot project

I'm trying out a pilot to sell Notebooks at TheNotebookStore (The Notebook Store). You can buy them on eBay here; eBay sellers page.

As a pilot I'm trying to see the popularity, selling process and margin that can be made, I welcome feedback on this project.


- Posted using BlogPress from my iPad

Thursday, 26 September 2013

Practical Study of Parallel Algorithms - by Kevin Gordon

This is the paper I wrote for my final year project at the University of Warwick. I include it here for personal reference, and also in the hope that someone else will also find this useful.

http://www.kevingordon.org.uk/projects/bsp/experimental-parlallel-computing-final-report.pdf


Abstract

This project gives an introduction to the field of parallel computing and the parallel computing model: BSP (Bulk Synchronous Parallelism). The aim of this project was to carry out the implementation and analysis of two BSP problems. The parallel broadcast problem and parallel matrix multiplication were implemented, several experiments were run, and the results were analysed. Analysis of the results revealed that the experimental results didn’t always match what the BSP model predicted, and this was highly dependent on both the type of architecture running the code and the optimisation of the code.

Where is the missing search feature in iOS 7?

Some people have asked me how you can search in iOS 7, because you can no longer swipe all the way to the left to search.

Well all you need to do is on any of the home pages, swipe down anywhere in the middle region of the screen and the new search feature will appear.

Voila, done!


iOS 7 some of what I like about it

The lock screen now looks great, and really awesomeness you can access the notification centre and control centre right from the lock screen.


Slide across and you get the much more attractive unlock keyboard;


The new home screen looks fantastic, it took a little while to get used to, but it actually looks a lot better than it used to look.


Swipe down from the top and you get the notification centre;


Swipe across to get Today view, which although doesn't give the graphic weather output, it actually gives something much more useful - that is a current weather forecast and outlook in text, which I actually use, whereas the old weather widget for me just looked pretty.

It's really good to have the calendar accessible via notification centre and the lock screen, fab. And you get a list of how many events you have tomorrow - would have been better if it listed what those events were but, it's still very good. Also would be good if you could swipe to get the whole of the day's calendar view, not just the next few hours.


Swipe up for the control centre, this is very good - gives you control of music player, airplay, and allows you to quickly turn on/off Airplane mode, Wifi, Bluetooth, Do not Disturb, and the orientation lock. You can also control the brightness, and quickly open the flashlight, clock, calculator and camera, friggin great!


And the icing on the cake is the new multitasking view, by double clicking the home button, which brings up a window of the apps, and allows you to swipe up to close, very Touchpad/WebOS inspired, and I really like it, and it is useful, and much more fun to swap to different apps this way.


And the notification banners that appear are now much more pretty, and integrated better. Overall I'm very happy with the new iOS 7.