Ubuntu 16.04 - Install Mailtrain

Mailtrain is a "clone" of Mailchimp, but is free and opensource. It also integrates with multiple email sending services, such as Amazon SES and SendGrid. Below is a BASH script you can run to deploy Mailtrain 1.2 to your Ubuntu 16.04 server. Unfortunately it must be run as…

Read this article

Debian 8 - Install GPG Extension for PHP 5.6

Below is a script you can run to install the GPG extension for the PHP 5.6 CLI and Apache on Debian 8. It may work on other distributions and versions of PHP, but I have not tested that. The script assumes you already have Php 5.6 and Apache…

Read this article

Introducing prog-exec

In a bid to try and make the sharing and executing BASH scripts safer whilst maintaining convenience, I am going to be introducing automated hash checks and digital signatures. This checking will be handled by your local computer using the new prog-exec script that you will need to install (instructions…

Read this article

Using cURL with BASH

Piping cURL directly to BASH is very dangerous. If a random stranger sent me a command like below, there is no way in hell that I would run it, and you shouldn't either. curl -s https://my-script/23 | bash That being said, I often do post similar commands on my…

Read this article

Debian 8 - Install PHP 7.1

Using Ondrej Sury The easiest way to install PHP 7.1 is to execute the following command. curl -s https://scripts.programster.org/scripts/23?output=raw | bash cURL with BASH disclaimer. Alternatively, you can copy and paste the following script, which is what the previous command downloads and executes.…

Read this article

Dependency Injection

Anthony Ferrara has a brilliantly simple youtube video explaining dependency injection that I highly recommend. In basic terms, anywhere that you pass an object into another Class's constructor, rather than creating a new instance of that object within the constructor, you are using dependency injection. Dependency injection allows for high…

Read this article

Configure Typescript for Jquery

By default, jquery will not be recognized in typescript files you create. This means that any jquery code you use will show up as erroneous and you can't make use of the auto-complete functionality. However, this is easy enough to remedy as shown below. Steps Copy the typescript declaration file…

Read this article

Database Normalization - Infinite Hierarchy and Linked Lists

In some situations you don't have a set structure and need to allow an infinite hierarchy, such as in a linked list. A real-world example of this is with people. There is no set grandparents and parents layer, but every person's parents is someone else's child. In terms of a…

Read this article

FFMPEG - Change Audio Level In Video

Today a colleague sent me a screen-capture tutorial on using a new system. Unfortunately their microphone was way too quiet for me to hear anything so I needed to find a way to boost the audio level of the video without wanting to reduce the quality of the video. Using…

Read this article

Ubuntu 16.04 - Install Seafile Client

Seafile is Dropbox on steroids and the best part of it is that you control everything and aren't parking your data on someone else's servers. Below are the commands to install the client on Ubuntu 16.04. sudo add-apt-repository ppa:seafile/seafile-client -y sudo apt update && sudo apt install seafile-gui…

Read this article