• DIY Doorbell Chime for Hikvision ISAPI with a Raspberry Pi Pico

    I have recently purchased a Hikvision DS-KV6113-WPE1(B) doorbell. The doorbell is one of very few PoE doorbells which look good, work well and relatively in expensive. The doorbell also allows the video feed to be viewed over RTSP which integrates well into my DVR system (Shinobi). Recently Hikvision have released firmware (Readme / Firmware) which ...
  • Building a Raspberry Pi Zero temperature monitor with web interface

    I’ve recently purchased a few cheap DHT22 temperature sensors from Amazon. They work great and use Python to display the data from the sensors. I found I required a way to log the data, so I though why not make this a project!? I have created a simple Web Interface to view logged data: https://github.com/ryanfitton/rpi-temperature-monitor-logging-interface. ...
  • How to install Home Assistant within an LXC container

    I have published this blog post to help anyone having issues installing Home Assistant (and Docker) in an LXC container running on Ubuntu. When I was installing Home Assistant on my own hardware, I could not find any straight-forward guides detailing how to do this, and Home Assistant’s own documentation does not help with installing ...
  • How to LazyLoad images in WordPress without using a WP Plugin

    This post explains how to use the jQuery Lazy library in a WordPress template. By implementing this library into a template manually will give you greater flexibility in terms of which images can be ‘lazy loaded’. A couple of requirements are necessary before using the jQuery Lazy library: Requires at least jQuery 3.4.1 – This ...
  • Using loadCSS with WordPress

    I have been using loadCSS from the Filament Group recently, it’s a great tool to asynchronously load your CSS files in-order to increase your scores for Google’s PageSpeed tests. The main issue I faced is using loadCSS with WordPress. WordPress has many plugins to install and each of these plugins usually integrate with the hook...
  • PHP contact form boilerplate

    Every now and again, there is a need for a simple HTML site which does not need the bloat of a CMS. However, these sites usually require a contact form, so to prevent the need of creating a new PHP form each time and re-downloading the PHPMailer library, etc. I have uploaded an PHP contact ...
  • LXD Container backup to FTP server script

    As mentioned in my previous post, I would post code for a script which will backup an LXD container as a snapshot, then transfer to an FTP server. The script to do this is below, it has been tested on Ubuntu 16.04 LTS. The steps listed below can be found in my LXC Container backup ...
  • Web related talks from Google I/O 2018

    Google I/O 2018 is now over, as with last year I have added links to a bunch of talks I have found interesting. Most of them are Web related, with a couple of Android and Google Assitant talks.   Google I/O 2018 main keynotes Keynote Developer Keynote   Web Building a seamless web Build a ...
  • Creating an LXD container on Ubuntu 16.04

    I have started getting-to-grips with LXD on Ubuntu – It’s pretty great! LXD makes it possible to separate your applications into containers, and the containers run close to bare metal. I’m running LXD on my webserver (the one hosting what you’re viewing this website on), with four containers: HAProxy: Used for sending port 80 and ...
  • Quick and easy FTP server install on a Raspberry Pi

    For this setup, i’m using Ubuntu 16.04 running on a Raspberry Pi 3. The instructions should work correctly in Debian and Raspbian too – in fact, you will probably have luck using these instructions on any Linux operating system, Raspberry Pi or not. Note: FTP is not a secure protocol, I would recommend using SFTP ...
  • VestaCP API firewall suspend and unsuspend bash script

    VestaCP offers an API which allows the firewall rules to be changed, but I could only find examples which use PHP and cURL and I required a script which would work as a Bash script. I’ve created a script below which you’re free to use. Ensure your host URL, admin username and password are correct ...
  • Version 2.0.0: Backup MySQL (Bash script)

    This is similar post to be read together with this. And a follow-up update to ‘Backup SQL files to FTP server‘ script. Some of my similar Backup scripts reside in a a GitHub here: https://github.com/ryanfitton/lxc-mysql-tar-backup-script-collection Version 2.0.0, now adds additional features and bug fixes: Now searches to ensure the required packages are installed. Uses ‘lftp‘ ...
  • Version 2.0.0: Backup server files as tar.gz (Bash script)

    This is a follow-up post with an update to the ‘Backup Files as Tar.GZ‘ script. Some of my similar Backup scripts reside in a a GitHub here: https://github.com/ryanfitton/lxc-mysql-tar-backup-script-collection Version 2.0.0, now adds additional features and bug fixes: Now searches to ensure the required packages are installed. Uses ‘lftp‘ to upload files via FTP. Lftp allows ...
  • Backup MySQL (Bash script)

    This is a follow-on from my previous post: ‘Backup server files as tar.gz‘. The script below works in a similar way as the previous, save as ‘backup_mysql2ftp.sh’ and fill out the ‘Backup options’, ‘MySQL Connection details’, and your email address. Run the script with sudo sh backup_mysql2ftp.sh (make sure the file is executable first). The ...
  • Backup server files as tar.gz (Bash script)

    This is a quick and simple backup script, specifically created for use with Online.net’s 100GB FTP Storage, which is given for free when buying one of their dedicated servers. The steps listed below can be found in my Backup script collection on GitHub here: https://github.com/ryanfitton/lxc-mysql-tar-backup-script-collection The script below is simple, saves as ‘sudo sh backup_files2ftp.sh’ ...
  • Disabling WordPress public REST API

    I've recently found that the public WP REST API endpoints within WordPress can provide information which can be used in 'hacking' attempts. One such endpoint is '/wp-json/wp/v2/users' (e.g. https://yourdomain.com/wp-json/wp/v2/users), this will display Admin usernames to any unauthenticated user. There are a couple of way to mitigate this risk, install the Disable REST API or add...
  • Notifying Google of an XML sitemap via a URL

    Today I found out you can easily notify Google of an XML sitemap by ‘pinging’ Google via a GET request: http://www.google.com/webmasters/sitemaps/ping?sitemap=URLOFSITEMAP.xml You can perform this via PHP, or if running on Linux; use wget.
  • Quick and Easy SSL chipers

    I’ve recently came across the https://cipherli.st/ site, from the cron.weekly email newsletter (I highly suggest you sign-up, some great posts and sites featured). Cipherli.st allows you to copy and paste SSL ciphers for a variety of web software (Apache, Nginx, etc.).
  • In-page embedded viewable PDF documents without a PDF reader

    Here is a neat trick which I’ve found: using a tool by Google named Docs Viewer you can embed PDF (Or office and Postscript) files into a webpage to be viewed on screen, even without a PDF reader plugin installed in the user’s browser. Simply use the snippet below and change where your_document_here is mentioned twice ...
  • My must-have Brackets plugins

    As a follow on from my previous post ‘Monokai theme for Brackets‘, I have produced a list of my must-have plugins for Adobe Brackets. Let’s go! Brackets Selections This plugin will add Sublime Text style selections. Github: https://github.com/DannyMoerkerke/brackets-selections Brackets Sort Text Extension Provides a couple of utility functions for sorting lines in the current document. ...
  • Monokai theme for Brackets

    For about a year I have been using Adobe Brackets as my go-to code editor, previously I was using Sublime Text 3. Whilst I still love Sublime Text the idea of Brackets being open-source and written in HTML, CSS and Javascript was something that got me excited. However the Monokai theme that I gotten used...
  • Looping through a Data Map with Sass

    I’ve decided to share this code for anyone who requires a quick ‘copy and paste’ solution for using data maps (map-get) and loops within Sass. This example will allow you to set values within the data map, then loop through and output as CSS rules. Setup the variables within the data map and create the code ...
  • Updated: Monitor your website and database uptime

    I have made some changes to the website and database monitoring script which I published in March 2016. A summary of these changes: The script can be used in PHP versions older than 5.4.0. The script has been work with PHP Server Monitor, an open-source self hosted monitoring solution. You can view the code on Github here, ...
  • Using statuscake.com to monitor your website and database uptime

    Note: Updates have been added since this article was originally written. These updates are listed at the bottom of this page, click here to view them. This guide will show you how you can monitor your website and database uptime using a free service from Status Cake (https://www.statuscake.com). Once you have setup an account, you will ...
  • Browser testing matrix

    If you’re building websites or Web apps, you will always need to ensure your product works well in a multitude of different browsers, operating systems and devices. To provide good testing documentation you will need a Browser Matrix. I have found the need for one myself,  I thought it will help others if I provide ...
  • WordPress Site Settings Plugin

    Learn how to create and use the WordPress site settings plugin I have created. This plugin will allow you or your client to easily edit a WordPress website's details such as the telephone number, META Keywords, Footer text, etc.
  • Using Google Alerts to see if your site has been hacked

    Google’s Webmaster Blog has recently posted about their #NoHacked campaign. This campaign is about giving website owners tips and tricks to ensure they don’t fall victim to a cyber attack. You can read about the campaign here, I highly encourage you do – it gives some great advice. Part of the advice they gave was about ...
  • PHP Function: Get a file’s last modified timestamp

    I’ve recently found the need to show a file’s last modified timestamp. This function is useful when including CSS or JavaScript files. By including a query string will ensure web browsers re-download a fresh copy of the file rather than using a cached file. Simply run this function as you’re including a file, such as: ...
  • What to expect from Google I/O 2015

    With Google I/O 2015 starting shortly, here is what I most hope to see: Android M announcement with news and Nexus 6 download images New Chromecast hardware and updates Android wear news and updates ChromeOS updates The keynote is scheduled to last 2.5 hours, so there should be much more news. Be sure to livestream ...
  • Custom WordPress login

    WordPress has a wide range of options to change the look and feel of your WordPress setup. One that most people overlook is the login box, accessible at http://yourdomain.com/wp-admin/. Using the code below, you will be able to apply a custom CSS stylesheet to the login page. Firstly create your stylesheet. You could name the file ...
  • Change Bootstrap 3 Navicon on toggle

    I’ve been looking at how to change the button icon which is shown across Bootstrap 3 navigation menus in a mobile viewport. For months I’ve come across a whole variety of clever Navicon icons which change when clicked upon. I wanted to implement this feature into a Bootstrap navigation menu. In the end, I used a ...
  • Using Font Icons with WordPress 3.8 Custom Post Types

    WordPress 3.8 introduced a new Admin design which now uses Font Icons instead of images. This method has many benefits such as great support for Retina devices and quicker load times. Before WordPress 3.8 you had to use images for your icons, now you can use Font Icons, specifically the icons designed for WordPress called ...
  • Working with Git

    Git is fantastic for version control, I have been using it quite often this month for work and personal projects. Although this isn’t the first time I have used Git, I did use it whilst at university. Although at that time I only used the Github Windows GUI client and whilst it was okay it ...
  • WordPress 3.7 Auto Update

    The WordPress 3.7 (Basie) release went live on the 24 October 2013. It’s great release and includes a number of important features, one of which is Automatic Updates. By default automatic updates will only be applied to minor version upgrades and not major releases. For example; versions such as 3.7.1 to 3.7.2 will be applied ...
  • PHP cron job to download podcasts

    I have built this script a while ago to keep track of podcasts I wanted to watch. My ISP gives me free internet usage after 11pm which doesn’t contribute to my monthly download limit so I needed some way to automate the download of the podcast. I decided to build this script in PHP as ...
  • Updated: Animated CSS3 Android Bot

    Since my first post of creating a CSS3 Android bot (here) I have wanted to add animated functionality, and in under 15 minutes I did just that. I have animated the right arm of the Android bot so it simulates ‘waving’. I have added a CodePen and a Gist below. See the Pen Android Bot ...
  • Android Bot created in CSS3 code snippet

    Update: I have posted an updated version of this Android bot using CSS3 animations here. I have been playing around with CSS3 recently. As a small test to see if it is possible to design with CSS3 I had a goal to create the Android bot in HTML and CSS. The finished code appears to...
  • CSS3 Flat UI Scrollbars in Google Chrome

    I have recently been developing a piece of work which required the scroll-bars to look flat and clean. I had previously seen Google’s Gmail site using the same sort of scroll-bar design which would fit perfectly into the piece of work I creating. Having a look around the web didn’t show much code snippets or ...
  • Implementing an image picker for WordPress 3.5

    Since re-developing my portfolio for this website, I found that the media picker script which I was using to select portfolio images should be updated. Originally the first version of the script was using the old WordPress Thickbox modal. Since WordPress 3.5 it has been possible to use the new WordPress modal. Although I found ...