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 ...
These instructions offer assistance with enabling/disabling Hyper V in Windows 10. I have found it necessary to disable this service for use with Virtaul Box, then re-enabling it for Docker. To disable Hyper V in Windows 10 (e.g. for use with Virtual Box): Ensure virtualisation is supported by your CPU and enabled in the BIOS ...
When building WordPress themes, there is often a need to use a featured thumbnail, or image value from ACF; as either a background image or as a <img> tag. This snippet below is something I use frequently, hopefully this will be as benefit for you too. <?php //Custom image sizes - Add these to your ...
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. ...
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 ...
The post displays hows to use WordPress Ajax functions to display a field’s value; and automatically refresh the field every 5 seconds. This example also includes examples of how to send an Ajax post to update the field. In this example, each click oft the ‘submit’ button will increase the numerical value stored in the ...
If you’re editing a website but only have theme access, and no access to the database, you can temporarily add the code below into your theme ‘front-page.php’ or other theme file to update either: The existing first user’s email address Add a new Administrator user Remember to remove this code when your have finished your ...
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 ...
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...
This has just come to my attention today, the developer team at WordPress will be making changes to the minimum PHP versions required by the WordPress core in the upcoming months. This is tracked in the core discussion here, a news article from ZDNet also talks about this change here. Starting with WordPress 5.1, a ...
First post of 2019! During the holidays I have been catching up on a backlog of video talks which I have been wanting to watch. I have embedded the videos below: HTTP Headers – The State of the Web This is a really good video, discussing some of the most common HTTP headers, how ...
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 ...
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 ...
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 ...
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 ...
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 ...
With Amp Conf over for 2018, there has been some great talks by speakers available on YouTube, these are some videos I felt gave me some good understanding for what's next in AMP.
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 ...
This is an example of how to use the YouTube API with multiple videos within a Bootstrap carousel. I have added Play/Pause functionality to a custom button and added the ability for the videos to be paused when the carousel is transitioned. A CodePen is attached below to see the example in action, and the ...
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‘ ...
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 ...
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 ...
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’ ...
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...
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.
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.).
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 ...
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. ...
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...
This simple PHP script can be used to perform HTTP and HTTPS redirects for your domains. I created this script as my DNS provider does not provide a URL redirection service of their own, and I didn’t want to setup webspace or a virtualhost on my server just for a redirect. To use this script, ...
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 ...
A brief tutorial of how to use Digital Ocean's V2 API as a free Dynamic DNS service. Use a sub-domain to provide a static point for connecting into your home or business.
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, ...
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 ...
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 ...
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.
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 ...
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: ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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...
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 ...
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 ...