Make SSH Environment available after sudo-ing to another User March 24, 2016

If you have 2FA enabled on Github (which you should have), you have to use the SSH method to do git operations related to your repo. This becomes a pain when you’re doing a lot of remote work (that you haven’t yet automated); because you either have to generate a unique password that you can use during the deploy, or switch off 2FA.

Read More

Configuring Multiple Loggers in Python June 17, 2015

At times you may want to have multiple loggers in your application, e.g. one for a payments module and another for a messaging module. I’m going to explain how to set this up in your application, as well as show some examples for usage.

Read More

Making your Bash Shell More Interesting Using Fortune April 16, 2015

Every time I open a new shell prompt, a message similar to the one below greets me:

Weekends were made for programming.
- Karl Lehenbauer
[email protected] ~ 00:27:16 $
Read More

Implementing Timestamped Models in PeeWee April 15, 2015

date_created and date_updated (or variations of the same) are important fields for any table. date_created to show when a record was created, date_updated to show when it was last updated. They are invaluable, especially for audit logs.

Read More

How To Escape Liquid Template Tags In Jekyll October 6, 2014

My blog has been on Github Pages for about a week now. So far, so good. I’ll say this again, Jekyll + Github Pages, a dev’s dream! I especially like the syntax highlighting provided by the Pygments plugin. So sweet, so simple.

Read More

Using Excerpts in Jekyll September 28, 2014

I was migrating my blog posts from Blogger to Github Pages today. Not the most interesting thing to be doing on a Sunday (Blogger exporter, y u export to HTML? I WANT MARKDOWN!)

Read More

Minify JS, CSS files on Save in Sublime Text June 16, 2014

We all know the advantages of using minified files in your web apps, i.e. faster loading, smaller payload, etc, it would make sense if all editors that we use have the feature built in, so that we don’t have to worry about it.

Read More

How I Used Apps Scripts to Automate Daily Report Generation November 3, 2013

Repetitive tasks… I don’t like them. They get monotonous.That’s what was happening a few days ago, when I was required to create some daily reports on our systems’ health, and upload them to a Google Drive Spreadsheet, i.e., run a few queries on the db, copy the data to the Spreadsheet (probably via a text editor, because Drive doesn’t know any other delimiters other than the tab :-(

Read More

Understanding our Auto-Generated Code: Model October 23, 2012

In this section, we’ll be going through our automatically generated code for the Model, Controller and Views. In our case, it’s the Users model, controller and views. First off…The Model

Read More

Using Gii (Part 1) August 10, 2012

In this section, we are going to use the tool that comes with Yii to enable us to generate Models, Views and Controllers for our project. You can learn more about MVC frameworks on Wikipedia.

Read More

Create Users and Grants in MySQL August 10, 2012

This blog post provides instructions on how to set up multiple users on MySQL. This is an advisable practice since it allows you to restrict access to certain databases to certain users only.

Read More

Yii Tutorial: Initial Yii Setup August 7, 2012

In this section, we’re going to set up our Yii application. The examples given refer to a Linux environment, however, it shouldn’t be too different for Windows and MacOS environments. Feel free to ask in case of any questions.

Read More

Yii Tutorial: Introduction August 6, 2012

This multi-part tutorial aims to show basic use of the Yii framework for basic tasks. Yii is a powerful PHP framework for building web applications.

Read More