Gavin’s Odd Bits of Code

2009-05-25 (Mon)

csshX 0.62 released

Filed under: Software — Gavin Brock @ 10:47 pm

New features:

  • Improved tiling:
    • Can specify rows/columns on the command line
    • Can change row columns Ctrl-a g and Ctrl-a G
  • Prevented spawned ssh commands from polluting bash history

Get it here:

csshX-0.62.tgz

2009-05-19 (Tue)

OS Overlays re-enabled by the Ordnance Survey

Filed under: Google Earth — Gavin Brock @ 9:41 pm

We’re back!

First I would like to thank you all for your support! I believe that your emails, posts and comments, regarding yesterdays blog post, made a difference. It’s great to hear from you – it’s what makes writing software for fun, erm.. fun!

I just received a detailed message from the Director of Products at Ordnance Survey, apologising for the communication regarding the disabling of the service. He explained, that this is not a “derived data issue“, but rather to do with the licenses:

(more…)

2009-05-18 (Mon)

OS Overlays disabled by the Ordnance Survey

Filed under: Google Earth — Gavin Brock @ 10:04 pm
Tags: ,

EDIT 2009/05/19: The service has been re-enabled – see this post

What’s happened?

After running my KML based Openspace Overlay for Google Earth service for the best part of a year, the Ordnance Survey has decided that the service is in conflict with the OpenSpace Developer Agreement, and I have had my API key disabled.

OS API Key Blocked

Although I have requested clarification on exactly what aspect of the agreement I am in violation of, or how I could make changes to to the service so I can comply with agreement, they have chosen that they would rather block the it. I will give full details of my conversation with the OS below.

What can you do about it?

Over the year, many of you have sent me great feedback of how you are using this service for many things including hiking, biking and even in schools. I have really appreciated this! I believe this service has benefitted the community, and that is why I have worked on it and hosted it (at my cost).

I believe the the Ordnance Surveys actions are unfair and unnecessary. If you feel similarly, here are some things you might like to do:

Finally, if you do follow up on this, and have time, drop a comment at the end of this post to let me know!

(more…)

2009-04-30 (Thu)

csshX 0.61 released

Filed under: Uncategorized — Gavin Brock @ 11:41 am
Tags:

New features:

  • A new “[s]end” mode that allows you to send host-names/connection strings to all windows
  • ssh-options can now be configured or set on the command line.
  • p in bounds mode shows you your current bounds, good for pasting into csshrc
  • Ctrl-a Ctrl-m to minimise all windows including master
  • Ctrl-a Ctrl-h to hide all windows and minimise master (my favourite :-))

Bug fixes:

  • Infinite loop on “enable mode” when some windows have closed.
  • Some document corrections

Available at: http://code.google.com/p/csshx/downloads/detail?name=csshX-0.61.tgz

Enjoy…

2009-04-20 (Mon)

csshX 0.60 – Resizing and moving window sets…

Filed under: Software — Gavin Brock @ 9:28 am
Tags:

I just uploaded csshX  v0.60.

Main new feature is draggable bounds changing. This allows you to resize or move your window set after it has been opened. Bounds changing is accessible using Ctrl-a b. Once you select the new area for the windows to use, press Enter to accept it.

* Note, dragging between Spaces on 10.5 does not work. I cannot find a way to ask a window which space it has been moved to, nor tell another window to move to a space.

You can also now hide your window (rather than minimise them) with Ctrl-a h. This is much faster than minimise, and I find Ctrl-a h, Apple-m is a great way to clear my csshX screens away temporarily. Window hiding has also allowed me to improve the retiling performance.

Other changes are minor, including one fix to the nasty infinite loop bug when using enable mode selection.

As always, please report any issues you may come across, preferably on the issues page.

2009-04-09 (Thu)

csshX 0.59 – Multi-monitor support..

Filed under: Software — Gavin Brock @ 11:57 pm
Tags:

Thanks to some great publicity from Mac OS X Hints, I have received lots of feedback and bug reports.

Number one issue has been multi-monitor support, and problems related to it. This is now working.

To use it, add a –screen n to your command line, where n is the screen number. It will default to screen zero if omitted.

This was actually a nasty problem since there is no quick AppleScript solution, and the only way to get screen counts and sizes is by calling the AppKit frameworks. This is Objective-C only and since csshX is written in perl, I had to mess with the PerlObjCBridge (or Foundation.pm as it’s known) to get the NSFrame. To make matters worse, NSFrame is not even Objective C, rather it’s a pure C struct. In the end, I use NSValue to give me a string “description” of the data, and parse this with regex’s (differenet for 10.4 and 10.5 naturally!).

Other changes:

  • Cursor keys now working for terminal applications like more and vim
  • Windows will no longer cover the dock (wherever it happens to be)
  • A –debug option for when things go wrong
  • Some documentation corrections.

The package is available at:

http://csshx.googlecode.com/files/csshX-0.59.tgz

2009-03-16 (Mon)

OS Overlay – 1,000 tile limit issue

Filed under: Google Earth — Gavin Brock @ 7:10 pm
Tags: ,

Wot no tiles? For some unknown reason, my OS OpenSpace tile limit has suddenly dropped form 30,000 to 1,000. As you can imagine, this pretty much cripples my Google Earth overlay.

Thanks to everyone for pointing it out – it’s great to hear that people are actually using this!!

I’m looking into it, and will update this post when fixed…

2009-02-11 (Wed)

csshX – Cluster SSH tool using MacOS-X Terminal.app

Filed under: Software — Gavin Brock @ 9:54 pm
Tags:

One of the all time great sysadmin tools is Cluster SSH. It allows you to open up ssh sessions on multiple machines and send commands to them all through a common master window. It’s a perl script that uses xTerms and Tk.

My problem was that OS-X has a bit half-hearted X11 support and I always wanted a version that used Terminal.app. Finally after messing with some Applescript the other day, I realised it is possible to do.

So I have created csshX – my OS-X homage to cssh.

(more…)

2008-08-05 (Tue)

Japan, Tokyo and *me* on StreetView…

Filed under: Google Maps — Gavin Brock @ 11:06 pm

As you may know, Google Streetview went live today in selected Japanese cities.

To celebrate this I bring you the “Random drives in Tokyo StreetView” page. (Intended as another page for WebSaver).

On your drives, if you get to Tsunashima, you may see this odd looking person:

Gavin in Streetview

Further back story on this page.

2008-04-23 (Wed)

JavaScript Sudoku Solver

Filed under: Web — Gavin Brock @ 10:36 pm
Tags: , ,

Solving Sudoku with software has been rather fashionable at the office this week. So here is page that does it in JavaScript entirely on the client:

Gavin’s JavaScript Sudoku Solver

As could be expected, this is not the fastest solver in the world, but it will get there using brute force. You have an option to watch the internal decision tree or not.

Gavin's Sudoku Solver screen shot

Inspiration for the code comes from a beautiful perl three line sudoku solver by Eccles & Toad. The extremely hard test case from the list of incredibly hard puzzles strings at Sudoku Players’ Forums on sudoku.com.

« Previous PageNext Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.