How to implement pagination in python Postgres, and jQuery AJAX

We will use a simple worklist app as an example. You should be able to copy the same patterns into your own project. This example will make a vertical pagination UX. Postgres / model Your sql must have an order by clause otherwise you will get random results. Both offset and limit must […]

Posted in: Python

How to setup an AWS RDS Postgres database

Aws Click launch DB instance. Select postgres. Enter database connection details, and select the micro free tier option. Im unsure about the network settings so i left the default settings there. Select "create new security group". We want one group for app instances and one group for database instances. Name your database. Click launch db […]

Posted in: Random

How to setup an AWS micro Ubuntu, Apache2, Python, stack

Hello, thought i'd blog about my python webserver stack installation attempt. It's quite general but please let me know if there is anything that could be done better. AWS Setup On the AWS dashboard click launch new instance. Choose Ubuntu AMI (free tier). Continue to choose free tier options. I'm unsure about the network settings […]

Posted in: Apache, Python, Ubuntu

Apache2 throws 403 Forbidden when changing VirtualHosts

After configuring /private/etc/apache2/httpd.conf to make my webserver point to /Users/e/Documents/dev on my MacOS, i received the below apache access log- - - [26/May/2013:19:35:24 +1000] "GET / HTTP/1.1" 403 213 My virtual host file - <VirtualHost *:80> ServerName myservername DocumentRoot "/Users/e/Documents/dev" ...

Posted in: Apache

How to install Python and Django with MySQL on MacOS

The easiest way to do this was with homebrew package manager and pip python package manager. Installing python, django, and mysql does NOT install the mysql-python database backend needed during python runtime. This is something we have to do manually. We therefore use the pip manager to install it. This article assumes you have MySQL […]

Posted in: Python

WordPress permalinks not working? Enable Apache’s mod_rewrite in Ubuntu.

By default in Ubuntu 10.04 Desktop, Apache2 will not have mod_rewrite enabled. This can cause your local installation of WordPress to fail on every page except the home page! If your WordPress configuration has permalinks turned on then the .htaccess file will be using mod_rewrite directives to display your site's pages. The solution ... sudo […]

Oracle SQL Developer – MySQL – Query execution was interrupted Vendor Code 1317

I came across this issue when i successfully connected to my dreamhost database. It randomly errors upon "complex" quieries. OTN Discussion Form Thread - this link gave me the cause of the issue but the solution wasn't clear cut. My issue was that a minor version of the MySQL JDBC was not compatible with MySQL […]

Replacing a cracked LCD screen from my Panasonic DMC-TZ15 Camera

One day i was holding my DMC-TZ15 camera when suddenly it slipped through my hands and dropped onto a metal rail. The result was a cracked LCD screen. I was very lucky that the camera was off as this reduced the chances of breaking the lens package. The picture to the right shows a cracked […]

Posted in: Random

Designing an 8 function 4 bit ALU

Hello world, this article was for an old uni assignment. I wouldn't know anything about this anymore! 1. Circuit Function 1.1. Brief This 8 function 4 bit ALU was created by combining four 1 bit ALUs, each with the following components and functionality- XOR X = A XOR B AND X ...

Posted in: Random