• PostgreSQL 9.1 Remote Access

    Concise instructions for setting up remote access to a fresh PostgreSQL 9.1 installation on Ubuntu 12.04 because I’m tired of googling every other month for it.

    In /etc/postgresql/9.1/main/postgresql.conf

    listen_addresses = '*'

    And in /etc/postgresql/9.1/main/pg_hba.conf:

    host    all     all      md5

    Note that this is horribly insecure, letting any user connect to any database.. It’s just an example.

    Finally, restart Postgres.

    sudo service postgresql restart
  • BBC Article on Betaville

    I mentioned a few weeks ago that I had been interviewed by the BBC about Betaville.  I was wondering if - and when - anything would come of it until yesterday when I was told that it was featured in the BBC Technology section.  I’m incredibly humbled that people are not only taking the work we did seriously, but that it is empowering people to be proactive in changing the world around them.</p>

    Although not mentioned in the article, I want to thank all of the past contributors (Google Code, Github) who have put something of themselves into Betaville.


  • Migrate to new git repository keeping history

    I ran into a [potential] problem recently when migrating an application from when repository to another.  I was only switching repo’s because my PaaS provider, as they all do, creates templated application structures for all new applications. Even though the original application’s repository is gone, its history is still valuable to me. Luckily, this can be fixed relatively easily with a little git magic!

    # Go to the new repository
    cd /path/to/new
    # Add the original repository as a remote
    git remote add original /path/to/old
    # Get the original's branch and merge it into yours
    git fetch original/master
    git merge original/master

    After the merge operation, you may find that a few of the files included in the application template have some conflicts.  You can simply resolve these by copying over the originals and committing the merge.  Your other option is to merge using the theirs strategy option by including “-Xtheirs” in your merge command:

    # Use the 'theirs' strategy option during a git merge
    git merge -Xtheirs original/master
  • Nuking WordPress Transients

    Occasionally in the WordPress world you come across plugins that just aren’t tidy. One of the nasty things that can happen is that your wp_options table gets filled with transient entries that are never garbage collected after their expiration. If you have a relatively high traffic site, like jMonkeyEngine, this will slow down your site to a crawl especially if new entries are being made on every page view (not naming names but the appropriate developers know the issues if they check their forums).

    That said, there’s a pretty easy way to just get rid of all the transient entries in your table regardless of expiration.

    DELETE FROM `wp_options` WHERE `option_name` LIKE '_transient_%'

    Run this if you notice your wp_options table is becoming bloated, or better still, deactivate the suspect plugin.

  • Interviewed by BBC about Betaville

    I was contacted last week by someone from BBC to be interviewed about my work on Betaville. We arranged an interview over Skype for this morning. I had a blast getting to talk about such a great project and look forward to seeing the press coverage.

    My thanks to Nastaran for getting in touch and conducting the interview!