Sam Doidge

Continual improvement

Technology Posts

Football Club Owner

Football Club Owner was a football management game on the App Store. It recieved thousands of downloads and many favourable reviews. Built using React Native.

Jekyll with Docker

Since moving to a new Mac, pulling down my blog to make a post - I really didn’t want to deal with configuring the environment to run Jekyll locally again. It won’t be the last machine I have to configure this on, and it’s not a systematic...

Football Club Owner Second Update

This is an update on Football Club Owner, the football simulation game I was working on, written in React Native. It is far from perfect, but it has been live on the App Store for some time now. I’m very appreciative of the constructive feedback and fair...

Football Club Owner UI Update

This is an update on Football Club Owner, the football simulation game I was working on, written in React Native. It is far from perfect, but it now live on the (App Store)[https://apps.apple.com/gb/app/football-club-owner/id1460395593]

Angular 6 with SCSS

This is a quick demonstration of how to create a project with SCSS as default ng new projectname --style=scss or the slightly more involved solution for changing an existing project to use scss.

Sass Lint Visual Studio Code Extension

This is a great Visual Studio Code extension I found when looking to tidy up my SCSS files. It will notify you of incorrect property order, alert you when you should use variables, and much more. You will need to install the sass-lint npm package with the...

Express API Hello World

This is a demo at the most basic level for creating an API in Node using the Express framework. You will need node and npm to run this. My preferred option is via Homebrew. brew install node should then give you node and npm. Use node -v...

Lazy Loading in Angular 6

This is a quick video of lazy loading working for Angular 6 routes. It is used when routing to feature modules, and stops the modules being initiliased before they are needed. const routes: Routes = [ { path: 'customers', loadChildren: './customers/customers.module#CustomersModule' } ] Is how a lazy...

Content Lord - Instagram posts from Slack

I just wanted to show what this little application looks like from my side, as I’ve been using it for almost a year now and I’m quite pleased with it. https://instagram.com/bitcoinmemes is the Meme page I post images to with this. The fact I had just posted...

Project Zeus

This title pays homage to the brilliant Peep Show. This is a project me and a friend, Ben, have been working on. We’re using React Native and Typescript to have just one codebase we can quickly create tests in, and also develop for mobile from. ‘Football Club...

Using Google Lighthouse for SEO

I debated creating this post, but it’s a useful tool you may not be aware of, and very easy to use. Lighthouse is an open-source, automated tool for improving the quality of web pages. You can run it against any web page, public or requiring authentication. It...

Laravel Inverse Seed Generator

This is a cool tool, and automates some of which I had been doing manually - creating seeds for data. With one command, it will create a seed for a given table (or tables) using the data already within that table - beautiful. https://github.com/orangehill/iseed To install, add...

Angular 6 and Font Awesome

Continuing with my screencast ‘series’ - the best way to integrate Font Awesome and Angular, this is simple and quick, shown on a fresh installation. Install the Font Awesome packages: npm install @fortawesome/fontawesome-svg-core --save\nnpm install @fortawesome/free-solid-svg-icons --save\nnpm install @fortawesome/angular-fontawesome --save Import the following within app.module.ts: import {...

Laradock, Laravel, Sequel Pro Demo

Rather than write a time-consuming post, I thought I would try a video. I’ve gone with a screen-cast, and despite having to do this twice as the Quicktime recording alerted me nothing had been recorded at the end, I think it was a lot easier than a...

MacBook Pro fans spinning while serving Angular

Fans spinning to a human audible level indicates your Mac is hot and your CPU is probably working hard. I recently updated to the powerful 2018 MacBook Pro 15”, so was surprised to hear them, with little more than Docker, VS Code, and Angular’s ng serve running...

beforeSteam

beforeSteam is a price comparison site for Steam games. Millions of price points tracked. Records price history for thousands of games in multiple vendors and multiple currencies. ~40 IP’s used for polling data without hitting limits. Amazon S3 for image hosting, Cloudflare as a CDN at the...

Why didn't Let's Encrypt auto renew?

I accessed one of my sites recently to find the SSL is invalid. Rookie error, I thought! I had probably just forgotten to setup a cron for auto renewing the SSL certificate for Let’s Encrypt… So I goto run the command manually, sudo certbot renew but it...

Differences across PHP versions

Now PHP 7.2 has arrived, and the previous versions are still in use, as shown above [1], I thought I would cover the differences between the versions now out there. I will be highlighting what I see as the most relevant changes to a PHP developer across...

Updating curl manually on Ubuntu

I wanted to update curl, but the version available on 16.04 of Ubuntu was 7.47.0, (not the latest 7.57.0) so the nice apt-get method wasn’t an option. Download the latest release from http://curl.haxx.se/download.html to your home directory: wget http://curl.haxx.se/download/curl-7.57.0.tar.gz Install the tools to compile this release: apt-get...

HTTP API Methods

I thought I would go over REST HTTP methods as things have changed slightly since I first started implementing them. REST (Representational State Transfer) advocates that web applications should use HTTP as it was originally envisioned, and this architecture overtook SOAP for API use, due to having...

PHP Interfaces and Abstract classes

This is a post to run through some of language features PHP provides for object oriented programming. Interfaces Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled. Interfaces enforce a contract, letting...

SEO Links

I’m interested in SEO / Marketing as I genuinely believe the difference between a successful product and a unsuccessful product is often just down to SEO / marketing. I also believe many people have a lot to offer the world, but lack marketing. Below are some guides...

Italian Fields

Another new design. I’m placing the Italian farm/fields image below as a monument to my last design. This is actually an old design of mine, as seen on the Internet Archive. Italian fields Remaining tasks There are several tasks remaining for the new design: Fix blockquote display....

Jekyll XML Sitemap Generator

Sitemaps are still important for SEO, perhaps one of the most improtant things. An XML Sitemap is now really easy to setup in Jekyll - easier than Wordpress, even. Here is my Sitemap. Simply add gem 'jekyll-sitemap' to your GemFile* and then run bundle. Add the following...

Hyper vs iTerm2

I recently saw a colleague using a shiny new terminal called Hyper. I liked the beautiful look, and the number of Github Stars - so I installed, and Googled comparisons. While it is nice to look at, installed fonts are still an issue (not much of one)...

The Power of nohup

nohup allows is to run a command, close our connection, and still have the command run on the server - very powerful. I’ve used this at times I know I have a command that will take a long time to run, but I need to close my...

Digital Ocean Swap File

Digital Ocean is a great service, but by default no swap file is set on their droplets. I first realised this issue when my droplet was killing my composer update process. This can lead you to thinking you need a more powerful Droplet, but simply enabling a...

Lazy load Disqus comments

I’ve implemented lazy loading of Disqus comments, it’s just a better way of handling comments loaded via javascript I believe. There is one potential drawback on SEO, but on the plus side there is faster page loads (better for SEO). I also like the fact I only...

SSL / HTTPS with Cloudflare

I get asked a lot of questions (I don’t ). Here’s a how-to on SSL with Cloudflare (they now provide this on their free plan): If you are only using Flexible SSL (HTTPS between cloudflare and end user) you do not want a redirect in htaccess /...

GitHub Contributions

You’ve pushed code and realised your contribution isn’t showing up! git config --global user.email Does this match your GitHub email? I’m guessing not - set it with git config --global user.email "[email protected]" You’re welcome.

Redesign

Evolution, not revolution is the approach I have taken. I was inpsired by the view of the future and software / technology in the brilliant film Her. Something I wanted from a redesign was to increase simplicity and remove unnecessary css transitions and shadows. Things are visually...

Multiple String Search

grep is a great tool for searching multiple files and directories for a string - but what if we have a list of strings we are looking for? A great solution for this is to enter the strings into a file - one per line. We will...

Background Server FTP Transfer

I had a lot of files to transfer, little bandwith from my laptop and limited timed. Can I have my server transfering the files in the background? Yes. My VPS has more bandwith than my current location. I needed to FTP the files, a little research and...

Fun Command Line Variables

Since my last post was such a success I’ve decided to continue the series. Command Line Variables You have a bash script that needs to FTP somewhere and want to test part of the script works outside of the whole script? Run it in the command line....

Fun OSX Terminal Commands

I’ve put fun - open is fun in that a new window pops up over your terminal showing you the files you are browsing visually, and drag-ablly. History is just useful! To open a finder window in the current directory you are browsing in terminal, use: open...

Public, private and protected in PHP

Not the most interesting post but essential for OOP PHP development: public scope to make that variable/function available from anywhere, other classes and instances of the object. private scope when you want your variable/function to be visible in its own class only. protected scope when you want...

Why use Sass?

Admittedly Sass has been out for years now, but I did’nt feel an urgent need to write about, until now. On small projects CSS can seem fine. On large projects they can quickly become difficult to maintain. Want to change a colour used throughout your site? At...

Auto reload with Grunt

What is Grunt? A ‘task runner’ - it helps us with reptitive tasks through automation, running from the command line. Why use Grunt? Reloading web pages after an code change does not take long but the time and extra actoins required builds up, we can automate this...

Do not use your domain name as a Hostname in Plesk

Cautionary tale: Do not use your domain name as a hostname. I installed a new version of Ubuntu with Plesk on my VPS again lately, and decided to use my domain name as a hostname within Plesk - thinking it would seem nice and orderly. Cue: an...

Speedy Laravel Development

This is a quick post to share a small tool (Laravel-4-Generators-Bootstrap-3) to quickly generate your database tables, controller with CRUD functions and scaffolding views connecting all this with one command: php artisan generate:scaffold tweet --fields="author:string, body:text" scaffold is the powerful option to generate the connecting view and...

Setup local sites with OS X Mavericks

You’ve just installed Mavericks on your lovely Mac, and want to do some web development, probably with PHP. Things are made simple for us in this version. I’m on 10.9.4 - others may need some other changes on anything older releases of Mavericks. I like to have...

Hello Jekyll

I’m now using Jekyll - a tool which transforms your markdown into static html. Following a great tutorial from Joshua Landa I was able to setup site relatively pain free (This is a lie. On OS X Lion I had a nightmare even installing Jekyll - a...

Levenshtein Distance

The Levenshtein distance between two words is the minimum number of single-character edits (insertion, deletion, substitution) required to change one word into the other. – Wikipedia To implement in MySQL, use the following function – if using phpmyadmin you will need to set a different delimiter such...

Fifa Trader

Fifa Trader connects to Fifa 13′s unpublished API to allow automated bidding and selling of Ultimate Team cards. Connection to FIFA servers possible from work done by numerous others on GitGub, my GitHub fork contains a current working app for ps3 accounts: https://github.com/samdoidge/FIFA13-Ultimate-Team-Search. Search screen once logged...

mongoDB

I created a site to test mongoDB, with Save a Tweet – storing my data in one ‘blob’. I like the simplicity, and not having to worry about relationships or changing the scheme down the line. I won’t be using this in place of MySQL on most...

SVN Tips

SVN is still around, some things I have found useful Add all files to SVN within current directory (recursively) svn add . --force Remove files from an add, within a folder (before commit) svn revert --recursive folder_name

Git Tips

Conflicts – if you just want to choose one version of the file or the other, you can use: git checkout --ours filename.c or git checkout --theirs filename.c Then mark as resolved and commit through: git add filename.c git commit -m "using theirs" Copying a specific commit...

Pro-shell-tips

cp -r /source-folder /destination-folder will not preserve permissions - you want to preverse permissions if backing up folder on a live server. cp -a /source-folder /destination-folder does the backup you want :) using wildcard in a transfer ignores hidden files. rsync -avz * /dest/folder will ignore your...

Using Git with Dropbox

**2014:** I now just use Bitbucket. note: I’ve set this up on Mac OS X. I’ve cancelled my beanstalkapp subscription, gone for a paid Dropbox one, and am moving my repos to Dropbox. cd ~/Dropbox mkdir -p Sites/your-repo-name/your-repo-name.git cd your-repo-name git --bare init This creates your Git...

Save a Tweet

Excuse the ugly design, this was a prototype image :) I’ve created Save a Tweet as a quick hack to experiment with mongoDB. With so many people saying something controversial, then deleting them, and a news article vaguely stating what was said, this site provides a way...

Database backups to Dropbox

I’m automating my database backups and storing them with Dropbox. You need Dropbox running on your server for this - it’s a great guide, but note one key point : when ‘This client is not linked to any account…’ appears - leave the service open, do not...

PHP London 2012 Conference

Roundup: Was it worth going? Yes. There is a lot to take in and it got my brain working. As programming conferences goes it was a riot ;) I was impressed with Rasmus Lerdof’s answers on the panel at the end of the Friday (the day I...

Find and replace a string across many files with Shell / Terminal

Useful commands for use with the Shell / Terminal. Spotlight tool - > ‘terminal’ to find on Mac OS. PHP used in this case, replace ‘php’ with the file extension of your choice. Find and replace a string across many files on MAC OS: find . -name...

WordPress vs Tumblr vs Posterous

**2014:** Posterous is now dead, I'm using Jekyll I’ve come back to the blog world and had to choose a platform to write my words. For me the choice was WordPress. Tumblr They have really carved their own space in the blogging world by trimming down the...

PintBet

Pintbet logo and strap line on the home screen. Users screen with ‘sparkline’ graph showing profit trend. Events Screen Tip Screen

wikidtutorials

This was a concept for a collaborative user-created tutorial site (and still a good idea), hence the wiki.

ur.gigs Website

This was produced as part of a university assignment - A user contributed gig review site built in PHP and using the last.fm API.  I went with a simple, and clean visual style.

View more