14 6 / 2011

Run multiple Notepad++ windows

I’m leaving this here more as a note to myself than anything else, as this quick tip for running multiple instances (windows) of Notepad++ is all over the place, but I find my self looking for it every time I format and re-install Notepad++.
Simply add the -multInst flag to your shortcut target, so that it looks like this:


"C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst


Simple!

Run multiple Notepad++ windows

I’m leaving this here more as a note to myself than anything else, as this quick tip for running multiple instances (windows) of Notepad++ is all over the place, but I find my self looking for it every time I format and re-install Notepad++.


Simply add the -multInst flag to your shortcut target, so that it looks like this:

"C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst

Simple!

13 6 / 2011

Send multiple records AND any related controllers to the view in CakePHP 1.3

This isn’t something particularly hard to figure out, but I was using the wrong search terms to help me figure this one out so it took me longer than it should have. Hopefully this will be of use to someone else, if just to explain it slightly differently. Recognise this snippet:

function index() {
    $this->Controller->recursive = 0;
    $this->set('controllers', $this->paginate());
}
Simply change “$this->Controller->recursive = 0;” to:
$this->Controller->recursive = 1;
This returns an array with nodes for each of the controllers related to the controller you’re using.

26 5 / 2011

I’ve been using Cygwin for ages, and while it has some great features it has some simple failures in its interface and integration with Windows. You can’t simply full screen it, and copy and pasting requires messing with cmd.exe settings.

But I’ve just discovered mintty and it’s a joy to use. Here’s the list of features copied from it’s Google Code page.

  • Xterm-compatible terminal emulation.
  • Native Windows user interface with a simple options dialog.
  • Easy copy & paste.
  • Drag & drop of text, files and folders.
  • Ability to open files and URLs with Ctrl+click.
  • Comprehensive character encoding support, including UTF-8.
  • Wide character display and Windows IME support.
  • Window transparency, including glass effect on Vista and 7.
  • Options are stored in a text file. No registry entries.
  • Small program size and quick scrolling.

Get it here: http://code.google.com/p/mintty/

Or select it from the packages when installing Cygwin.

20 5 / 2011

reCaptcha and table based layouts

What based layouts? Table based layouts. I’ve been doing a small job making some modifications to a very old system that uses table layouts and non object oriented PHP. Frankly it’s a mess, and table layouts don’t just make it difficult to make layout changes. They were also the source of a problem installing reCaptcha that had me stumped for well over 2 hours!

Basically, if you have a structure like this:

<table>
  <form>
    <?php
      require_once('../class/recaptchalib.php');
      echo recaptcha_get_html($publickey);
    ?>
  </form>
</table>

It simply wont POST the necessary fields “recaptcha_challenge_field” and “recaptcha_response_field”. I don’t know why, all I know is that they’re called from a function in the reCaptcha library and this is how to solve it:

<form>
  <table>
    <?php
      require_once('../class/recaptchalib.php');
      echo recaptcha_get_html($publickey);
    ?>
  </table>
</form>

Make sure the form tags are wrapping the table tags. I’d love for someone to tell me why this is, but for now I’ll have to settle with just knowing that it works.

19 5 / 2011

I’ve written a new blog post over at cenix.co.uk. Check it out.

I just started on a job to make some changes to a really badly made PHP job board system and came up with this solution. I had originally thought it could be done by using Window’s “hosts” file but that only supports IP addresses, so I couldn’t add a sub dir.

11 5 / 2011

Part of the footer for the Little Engineering website I&#8217;m working on. Really really really enjoying working on this project :D

Part of the footer for the Little Engineering website I’m working on. Really really really enjoying working on this project :D

06 5 / 2011

Just trying on different colours with this logo.

Just trying on different colours with this logo.

05 5 / 2011

A little toggle switch I&#8217;m working on. I&#8217;m not happy with it yet, going to give it some more detail. I really want to use a toggle switch in something now.

A little toggle switch I’m working on. I’m not happy with it yet, going to give it some more detail. I really want to use a toggle switch in something now.

04 5 / 2011

Working on my first custom design in ages and loving every minute of it. I worked on a logo today. Concerned I might be following the &#8220;meme&#8221; of old fashioned logos right now but I like it. I hope the client likes it too!

Working on my first custom design in ages and loving every minute of it. I worked on a logo today. Concerned I might be following the “meme” of old fashioned logos right now but I like it. I hope the client likes it too!