Local development w Google Cloud SQL

Saturday 11. May 2013 Recently, I have been diving in Python, GAE development for most of the webapp I develop. I am trying out Google Cloud Sql and started this site standanddraw.com for the new card game I have sink myself into. However, I was developing the initial version of it without real local development testing. This weekend, I added unit testing as well as making sure I can test my app locally, so I began to set up mySql on my local machine and ensure that GAE can connect to it - Not as easy as I though to be!

The documentation on Google Developer seem to be throwing an error in my local dev:

TypeError: connect() argument 6 must be string, not None

After digging around, I managed to find a workaround according this thread:

if (os.getenv('SETTINGS_MODE') == 'prod'): # This is for production (GAE)
  conn = rdbms.connect(instance=_INSTANCE_NAME, database='dbname', charset='utf8')
else: # This is for local development
  rdbms_mysqldb.SetConnectKwargs(host='localhost', port=3306, user='user', passwd='pwd')
  conn = rdbms.connect(instance='MySQL55', db='dbname', charset='utf8')

Works like a charm now!

View Comments

Air Parrot - AirPlay for Apple TV for older MacBooks

Sunday 14. October 2012 Air Parrot on Mac Pro

I just upgrade all my macs to Mountain Lion 2 weeks ago. So I got myself a shiny new Apple TV yesterday, in hope that now I can stream my
video game playing, videos, etc, to my home TV. This way, I don't have to deal with the cables mess of carrying them from one place to another.  Then to my dismay, it looks like AirPlay only works with 2011 Mac. I am still using MacPro 3.1 (Late 2008) and a pre-unibody 2008 MBP.

Of all the gadgets at home, only the IPhone 5 works with Apple TV. But who will use an brand new IPhone 5 to do that ? I will rather use it to check Maps and ask Siri for directions.

Just when I thought Apple TV is going into the store room, I figure out that the universe cannot be so broken and someone must have figure out and do something. Fortunately, that's is true and Air Parrot comes to the rescue. Air Parrot enable AirPlay via software encoding. rather than using hardware (which requires 2011 Mac, and IPhone 4s and above). It works extemely well, with my playing HD video on my Mac Pro. Now I can look at my TV as I write this blog post. I am pretty sure my eyesight will improve significantly overtime.

Jokes aside, this is one software that is worth the $9.99 for.

View Comments

Using Bitbucket for private Git

Monday 01. October 2012 I have been looking around for a private Git repository to store my source files for this blog. As managed in my first post, I am trying to keep everything free and not pay for any services, at least for the time being (except for the domain name of course). I want to see how far I can go with that.

As much as I love Github, I am currently using Bitbucket, which pretty serves my needs for now, and offer free Git private repository. I will most probably open it to public once I added more features to this blog!

View Comments

ExpertRIA Reborned!

Saturday 29. September 2012 ExpertRIA have been down are a pretty long time, almost 12 months!

Long story short, I decided shut down my dedicated server last November to save cost, and moved everything to a PAAS (which I have not decide at that time). But when everthing is set to go, my new place arrived, and I am absorbed into a whirlpool of renovation and furniture hunting. After that I spend a few months busy with work, but in the process build some App Engine apps using Java and Python. So I thought..why not just move everything to Google Apps? 

So..heres where it is now. I set up Google Apps on Thursday, download the HTML boilerplate on Friday, changed my domain DNS on Saturday,  and lazily conjured a not so good looking but at least online website - With a proper Ad server , working email and FB comments :D

I didnt install any blog software as the joy of creating HTML and writing code is actually more satisfying than writing the blog post itself :) Lets hope I got some bandwidth in the coming months for some experiments, web goodness and some events organizing.


View Comments