Blog Posts

How to make a disk cache using PHP

April 5, 2020

If you have a busy PHP driven website and don’t want to make constant queries to the database for each user that will see the same data, then you can easily resolve this problem by letting the first of these visitors generate a cache for the consecutive visitors.


Read More

How to remove files without a certain extension?

April 4, 2020

You have a directory with a lot of files, and you want to delete only the files that don’t match a specific extension.


Read More

How to debug an Apache 404 error

April 3, 2020

So you are getting an error 404 or perhaps even worse, a 500!


Read More

How to Reorder Data in Log Files using Python

April 2, 2020

Let’s say that you have an array or a list, or logs.


Read More

Another WTF Javascript Moment

April 1, 2020

Javascript is a powerful language, but sometimes it doesn’t always do what you expect it to.


Read More

How to Bring Back GROUP BY in MySQL

March 31, 2020

If you are suddenly not able to perform GROUP BY statements as you used to after a MySQL/MariaDB version update, then you will have noticed the change forced upon you.


Read More

How to implement a Queue using Stacks in Python

March 30, 2020

A common programming interview question, and for a change, one that you will actually be able to use in the job, is that of implementing a Queue by means of using Stacks in Python.


Read More

Find positions of largest groups of characters in a String with Python

March 29, 2020

The question Take a string S of lowercase letters. These letters form consecutive groupings of like characters.


Read More

How to make Git “forget” about a file that was tracked but is now in .gitignore?

March 28, 2020

You can ignore certain files and folders from being committed to Git by means of including a .


Read More

How to Purge the BinLog for MySQL and MariaDB

March 27, 2020

If you see lots of disk space quickly disappearing on your MySQL or MariaDB server, then you may want to look into the BinLog directory, it is located at /var/log/mysql/.


Read More

How to Measure Execution Time in Google Colab

March 26, 2020

Google Colab is a fantastic environment to write Python code using Jupyter Notebooks, hosted for free by Google.


Read More

How to fake a User Agent in Python

March 25, 2020

A User-Agent is a bunch of text that is sent with every HTTP and HTTPS request.


Read More

How to Delete from a Table where rows match in Another Table – MySQL

March 24, 2020

So you have a table where you want to delete a bunch of rows, based on a particular column being matched in another table.


Read More

REPLACE INTO instead of INSERT INTO – MySQL

March 23, 2020

There are many occasions where you need to INSERT a record into a MySQL database table, but the record already exists.


Read More

Read the bottom n lines of a file in Python

March 22, 2020

Using Operating System Commands in Python Use the Linux/Mac tail command to provide the data:


Read More

How to Format a Number as a Currency in Javascript

March 21, 2020

There are quite a few ways to format a number as a currency value in Javascript.


Read More

How to Change the Timezone on Ubuntu Server

March 20, 2020

If you’ve ever typed date into your Ubuntu Server and seen a different time or timezone appear than you expected, then it probably means that this tutorial is for you.


Read More

How to make a Python script Pip-installable

March 19, 2020

As Python developers, we’ve all used pip to install applications, but speaking to other Python developers, it’s not always clear how to make your own application/script pip-installable.


Read More

How to Host an AngularJS site on AWS S3

March 18, 2020

AngularJS is a Javascript Framework that allows you to create dynamic front-end web applications easily.


Read More

How to send emails using Python and AWS SES SMTP

March 17, 2020

Sending emails using Python and AWS’ SES service is really easy.


Read More