Posted on Leave a comment

Using Laravel Mix with Webpack for All Your Assets

Laravel Mix provides a fluent API for defining Webpack build steps for your application using several common CSS and JavaScript pre-processors. The lovely creators of Laravel Mix, put in the common webpack configurations and you can add more custom configurations if you wish. This is especially wonderful for people that want to use webpack, but feel like configuring webpack is too difficult. Or maybe they wanted to use ES2016 but saw some complicated article about…

Read more

Posted on Leave a comment
Posted on 2 Comments

The stages of learning, and their problems

learn

I strongly believe in my ability to learn, and that is my greatest asset. The times we live in mean that most of what we know now will soon be useless, and only those that can learn new things will remain useful. The times we live in mean that most of what we know now will soon be useless, and only those that can learn new things will remain useful. Most of the techniques I…

Read more

Posted on 2 Comments
Posted on 4 Comments

Why people turn to alcohol when in pain

drink alcohol

So, yesterday, I was sad. Very sad. I lost something I loved, and even if it made sense, it still hurt. However, in that moment, I realised something. I found myself desperately looking for a way to occupy my time not to think of it, and while I did not choose alcohol, it made me come up with another of my many theories (I’ll write about more of them going forward). Lifecycle of pain Emotional…

Read more

Posted on 4 Comments
Posted on Leave a comment

Easy and powerful reverse proxy and load balancing with Docker

nginx reverse proxy

I build a lot of websites, and I run them in Docker containers. What happens is, I end up with URLs like this 0.0.0.0:1234. This is a problem because, They are difficult to remember Do not allow sub-domains. Bad for password managers My initial solution was to add a reverse proxy with Nginx so I have virtual hosts that point to my containers. However, this means I was writing the same Nginx configuration, over and over…

Read more

Posted on Leave a comment
Posted on Leave a comment

How to create an autocomplete input with plain Javascript

Now, most people who have built websites have included forms. Regular text elements, number, select (dropdown), checkboxes and radio buttons. The problem A situation I’ve often encountered is where we need the user to choose from a very long list of options. The easiest thing to do is to put all the options into a select element. However, this is impractical because… It can make for a very terrible user experience If all the options…

Read more

Posted on Leave a comment
Posted on Leave a comment

How to build a multi tenant site with Laravel ― Scotch

laravel multi-tenant site

Laravel is a wonderful framework, however the default settings make it difficult to use for more than one domain at the same time. A multi tenant site is one that uses the same codebase to serve data to multiple clients. A very popular example of this is slack. A multi tenant site will usually require that each tenant accesses the site from a unique url, and this causes problems because laravel by default, does not…

Read more

Posted on Leave a comment
Posted on Leave a comment

Moving a WordPress site into a Docker Container

docker-wordpress

WordPress is a very popular and flexible Content Management System (CMS). If you build websites, you are likely to have worked with (or had someone ask you to) WordPress. There are several tutorials about how to set up a new WordPress site with docker. Here is a very good one. However, no one really says how to move an existing WordPress site into a docker container. I have several servers on Digital Ocean, Linode and Vultr,…

Read more

Posted on Leave a comment
Posted on 1 Comment

Docker, Nginx and Let’s Encrypt for a secure website

docker

Let me show you how I use Docker, Nginx and Let’s encrypt to host my websites and serve secure https content. I use Docker to host a lot of my websites, and with Let’s Encrypt now issuing free SSL certificates, there is no excuse for not having one. Things to note My test server is running on Ubuntu 16.04. Though the process should be similar on most other servers. You should have pointed your domain…

Read more

Posted on 1 Comment
Posted on Leave a comment

5 Marketing Lessons From Annoying WhatsApp BCs

There are many marketing lessons we can learn from annoying broadcast messages. We’ve all seen them, and we hate them. But they are so successful. We keep seeing them recycled after months and sometimes years. Which means that there is something right about it that makes people continue to share it. If only we could have that type of marketing for our startups right? So let’s see what we can learn from it. 1. Appeal…

Read more

Posted on Leave a comment