Noel Codes

Hacking notes of Noel Puru

Django Dynamic Field

Django Dynamic Field provides the ability for Django admin users to define field types of inline models.

Serious mistakes to avoid when choosing a domain name

In this article, I will walk you through my journey of choosing my own domain, and discuss the mistakes I've done in the past. My hope is that it will help you avoid these mistakes and get your perfect (or nearly perfect) domain in a less painful way

Sending OTP SMS with Textlocal

When I tried it, I got this error: "Invalid template". For anyone out there who will have this kind of problem, the way to use a template is simply to send a sms with a message exactly the same as that in your template. That's it!

Setting ROAS bid using Google Adwords API

The algorithm may swerve way lower than your actual target settings, specially when you still don't have enough historical data. To fix this problem, you may want to manually set the bid floor and bid ceiling.

Setting up Vim SQL Workbench on MacOS

This serves as my guide in case I would have to do it again, like when a clean OS reinstall is needed. This guide is for MacOS Mojave. Here are the apps I installed:

X-CSRFToken Header Resets Session Object

When a link is clicked from a page, it opens another page in a new tab, and at the same time sending an ajax request. The ajax request, for some reason, is resetting the Session object. any new data added in the session will be lost.

Running Scrapy on Django-Chronograph

So after creating my scraper using Scrapy that runs in django management command, I tried to deploy it using chronograph.

Django on Google App Engine plus Cloud SQL

Today I have successfully migrated this blog to Google App Engine (GAE) with only a change in the database settings by exploiting the new Google Cloud SQL. Here are the steps I did:

Optimization Pitfall: Memcached Memory Limit

Fortunately Django comes with great caching techniques which can bypass all the calculations on the Python level. Memcached is the fastest of them all as described in the Django documentation. In order to effectly use this feature

Create unhex() function for MSSQL

The MySQL query works if I run it in MSSQL Query Browser but it doesn't work in Stored Procedures. This is why I have created this user-defined function in MSSQL to replicate the unhex() function of MySQL.