Posts tagged 'code'

Notes about Redmine and GitHub Post-commit Hooks

We’re currently using Redmine for our project tracking and recently have wanted to have our GitHub projects automatically get updated within Redmine. A post-commit hook to the rescue!

  1. Download and install this super plugin: https://github.com/koppen/redmine_github_hook and restart your Redmine instance.

  2. Set up your local Git instance for your repository.  This is simple, but you need to follow these steps or else pulling your changes down won’t work:

    git clone --bare git://github.com/davidjb/123.git
    cd 123.git
    git remote add origin git://github.com/davidjb/123.git
    
  3. Configure your Redmine project’s …

Plone/Zope, Python and collective.autoreload / plone.reload

Here’s an interesting error message I got stumped with for a good set of hours.  The issue started with me using collective.autoreload with Plone and it does the trick, mostly.  With any such ‘operation’ and live reloading of code for Python, you’ve got to expect that not everything will go according to plan.  Most things do, but one issue I found presented with this error message:

< ... huge traceback ...>
TypeError: super(type, obj): obj must be an instance or subtype of type

The issue arises for me (and you’ll probably see it elsewhere) when I go ahead …

HTML formatting made easy

There’s a tool for everything somewhere on the web.

Whilst about 99.5% perfect (some indentation issues remain), I’ve found a pretty nice, easy to use, and very feature-rich HTML code formatter. See http://www.mycoolform.com/index.php?lang=en for the formatter.

It’s something I was looking for a while back but didn’t have so much luck to stumble onto something so useful.  Previously, I was looking for something that would fix up some HTML to XHTML and whilst I’m sure something was out there, the problem was I needed something that would …

Plone: Correcting Page Template Errors Easily

Here’s how to correct pesky problems in your code/XHTML since the line number and column references are slightly useless in the ZMI.

Paste contents from a page or page template from the ZMI into a program like gedit and then the line and column reference numbers will be correct (once you remove the comment about the error from the top of the page).

Editing in the ZMI is a bit painful, but we persevere.