Blog move to AWS using Laravel Forge

I recently moved where my blog is hosted. It used to be hosted with NameCheap. I originally hosted with them due to a good offer they provided me with meant I paid next to nothing to host my WordPress blog for the first year. That offer came to an end and it wasn’t worth the cost to carry on hosting there. However, NameCheap is an excellent hosting provider with two-factor authentication and would have no hesitation in recommending them to anyone.

Recently, I have been trying to learn the intricacies of AWS, so I decided to move my blog to an AWS infrastructure hosted on a t2 micro instance. This instance seems to be running two of my sites with no trouble so will continue to use this, unless I see an unlikely need to scale upwards.

In order to make the move as easy as possible I utilised Laravel Forge in order to deploy a WordPress install to my t2 micro instance. I then simply uploaded a WordPress export file and my blog was live again.

File downloads to a user accessible location in NativeScript

Recently, at work, I have been tasked with developing a large app for use on both IOS and Android. We wanted to go with a development framework that would allow us to maintain one codebase. After much discussion, we decided to go with NativeScript, the reasons of which I will discuss in another post.

I was having issues downloading files from a given URL to an easily accessible location by the user. I had worked out how to save the file to a private location on the user’s device that only the app can access, this was no good, however, as I required the file to be easily accessible. So I raised a GitHub issue to see if this was a bug, a feature not available yet, or I was doing something wrong. I hoped it was me doing something wrong as it was a feature I needed.

As you will be able to ascertain, after a lot of technical discussion on the GitHub issue with the repository maintainers and other high-level contributors, we had derived from the decision that this was just not a feature easily available via NativeScript yet. This was a problem for me, I needed this feature.

As a workaround until this feature is introduced I begun to think what do I do on my phone which I could utilise via NativeScript which would allow me to achieve this. So, in the end, I settled on opening the user’s preferred internet client, directing them to the given URL, which would then give them the option to download the file to their device. It’s not great because it takes the user away from the app breifly and it exposes the URL, but I got around this via putting in extra security measures around the code on the backend of the URL.

In the end, my solution works well and will keep you updated as to when a native feature for downloading files to a user accessible location in introduced in NativeScript.

 

GitHub maintenance after short absence

Recently, due to moving house and having the Christmas period I have been lacklustre in keeping my GitHub account up to date.

So I have done some maintenance. All tickets and issues on my repositories have been responded to, closed, or resulted in bug fixes, which are now in progress. Also, I have responded to other repository maintainers who were waiting on a response from myself as a result of an issue I had raised on their work. Shout out to the maintainers of the NativeScript repositories for their great support.

In particular, my ‘Laravel bootstrap modal form‘ has had an early spring clean. Apologies to anyone who was waiting for me to get back to them.

Laravel Bootstrap Modal Form ownership

Laravel Bootstrap Modal Form is a semi-popular library on GitHub amongst Laravel PHP developers which is actually written in JavaScript and jQuery. At the core, it’s simply used to display errors inline on a form without losing that session. On a technical level, on submitting a form, it makes an ajax call to the route defined in the form and checks the rules of the Requests validator. If any of the rules are broken, it gets the rules corresponding error message and displays them nicely on the form.

At work, I have been using this library to trap errors on forms that I create. In Laravel (5.1 and above I believe), you can pass arrays through to a validator and write rules to iterate through that array. This can be useful when you are working with forms which are created dynamically. I discovered that Laravel Bootstrap Modal Form didn’t handle array validation. Instead of waiting for someone to fix this or respond to my issue, I decided to fix it myself, cloned the repository and altered the script and raise a pull request.

Subsequently, this pull request was accepted and the owner, Jesse Leite said he had no interest in maintaining the script and more and offered me ownership of the script to maintain it. This is something I would like to pursue and is exciting for me as it will be the first time taking ownership of someone else mildly popular repository. I’ll update my blog with more news accordingly.

Below is the code I added to the script:

//handle arrays
if (field.indexOf('.') != -1) {
    field = field.replace('.', '[');
    //handle multi dimensional array
    for (i = 1; i <= (field.match(/./g) || []).length; i++) {
        field = field.replace('.', '][');
    }
    field = field + "]";
}

AdMob verification threshold hit

Last week I got a letter through the post stating that my app Glyphy has generated enough revenue that I need to verify my address. For the UK this happens when you hit £10.

The next threshold is £60 at the time of writing. When you hit this threshold it allows payments of the money you have earn’t to actually be sent to you.

A long way to go before any revenue actually hits my pocket, but not too bad considering I started this project as a learn and evolve project.

The following link talks about and outlines the different thresholds in different countries for AdMob: https://support.google.com/admob/answer/2772208.

 

 

Glyphy v2.1 – AdMob integration

Version 2.1 of Glyphy was released into the Google Play store on the 19/04/2016.

This version has AdMob integration enabled. This is my first attempt at monetising Glyphy.

Planned features for the future:

  • Download translated text as an image

A link to the app in the play store: https://play.google.com/store/apps/details?id=com.ryansmurphy.glyphy

Recently transferred domain names

As of the 16th April 2016 I began the process of transferring my domain names from NamesCo to NameCheap.

The decision to move my domain names took about a year of deliberating as its not a cheap decision to make. Not only do you have to pay for the transfer into NameCheap, you have to pay for the transfer out of NamesCo.

The reason I decided to move from NamesCo is due to high prices, poor customer service, and no two factor authentication. I decided to transfer to NameCheap because they have reasonable prices, respectable customer service, and great two factor authentication.

Domain names transferred:

  • evilowldigital.com
  • gamesgamez.co.uk
  • pbrentals.co.uk
  • ryansmurphy.com
  • tickertrades.com

Laravel Spark released

Great news yesterday, 15th April 2016, Taylor Otwell released Laravel Spark. This was earlier than the earlier stated release date of the 19th.

Laravel is an MVC framework for PHP. Its relatively new when compared to other frameworks like Code Igniter. Laravel Spark, created by the same person who created Laravel, is a paid solution, and builds on top of Laravel to provide you a complete billing, teams, everything solution so you can get started and build a SASS app.

Glyphy v2.0

Glyphy version 2.0 was released on the app store this evening.

The app is now built on the ionic framework and uses Google material design concepts as a basis for user experience and design. I originally planned to redevelop the app using PhoneGap but after research decided to go with ionic due to the advanced build tools, documentation, and wide community.

The app has a completely new look and feel.

Upcoming:

  • AdMob integration
  • download translated hieroglyphs as an image.

A link to the app in the play store: https://play.google.com/store/apps/details?id=com.ryansmurphy.glyphy

New android app – Glyphy

I would like to introduce my android app which is now in the play store – Glyphy. Its a very simple to use hieroglyph translator. The premise is that you enter text you want to translate and it will translate it into hieroglyphs.

Updates I may or may not get round to include:

  • design overhaul
  • save translation to image
  • recode in phonegap for multi device purposes.

If you have any other ideas let me know.

A link to the app in the play store: https://play.google.com/store/apps/details?id=com.ryansmurphy.glyphy