Archive for February, 2011

Reflex Feedback 0.2

An updated version of the Reflex Feedback widget is now up.


  • New icons done by myself and released under the same license as the code; no longer using the ones by Yusuke Kamiyamane. This should also make it easier for those who want to do custom modifications as they don’t have to worry about an attribution requirement for the icons.
  • New menu layout and new buttons. Now using jQuery UI buttons for everything, which allows for compatibility with jQuery UI styling, ThemeRoller, etc.
  • CSS fixes to prevent some inherited styles from screwing up layout.

reflex feedback widget

For info on how to use the widget, see my original post on Reflex Feedback.


Photo by Mihai Iacob for the 2010 National Geographic Photography Contest,

chicago, photography by Mihai Iacob, 2011 National Geographic Photography Contest

I happened to be in the right place at the right time when I took this picture. The place was Nichols Bridgeway leading to The Modern Wing of The Art Institute of Chicago, with beautiful views of downtown Chicago, while the time was sunset. I love the architecture, the vibrant city life and the light, all captured in the same frame.

The last IPv4 blocks

A somewhat historic moment, the last IPv4 blocks were allocated to regional registries last week. We now move to IPv6 or the internet stops growing (well, sorta, putting aside things like virtual hosting, NAT, etc.).

last IPv4 blocks allocated

Web safe fonts

Despite growing @font-face support, it’s still useful to know which fonts are web safe.

This very cool chart was made by Dustin Brewer,

web safe fonts

Tahoma is missing from the table. I think it’s up in the air whether or not it’s web safe. It’s shipped with all versions of Windows since Windows 95 and ships with OS X 10.5 (Leopard) and higher, but on Linux you generally won’t find it – it’s not installed by default and not part of the msttcorefonts package. However, a fallback to the similiar, but wider, Verdana may be acceptable.

Rtf2Html 1.22

New stuff:

  • UI tweaks
  • Removal of block indent (where every line is indented) from pasted RTF text
  • Tweaks for better HTML output (e.g. no more useless span tags containing only whitespace)
  • Accurate preview using XULRunner (via GeckoFX); no longer using the stupid .NET WebBrowser control
  • New logo/icon (I just really hated the old one I made and it was bugging the hell out of me)

Rtf2Html logo

Download here
(requires .NET Framework 2.0 or higher)

Rtf2Html screenshot

The app was designed around the goal of being able to quickly copy and paste snippets of code from Visual Studio (or Netbeans) and turning it into HTML that I could embed in these blog posts; this update stays true to that, and that’s why this app is still so sparse on features, such as conversion of font size or paragraph alignment attributes.

The block indentation removal that now occurs after text is pasted in may be a bit slow. Text in the RichTextBox is selected and altered within the text box itself (it’ll also freeze the UI – if you understand multithreading and WinForms, you know why it’s not simply a matter of spawning off a thread). The alternative is to deal with an RTF parser and edit the RTF input directly, but that’s way more work than I’d care to devote to this app at the moment.

Launching a Mono/.NET exe from Adobe Air

I’m working on some bridging code between Adobe Air and Mono/.NET stuff. The first challenge in the process was figuring out how the launch the .exe from Adobe Air. In Windows you can just launch the .exe file (assuming the .NET Framework is installed), but for other system you need to pass it as an argument to the mono executable. The JavaScript code is shown below.

var proc = new air.NativeProcess();
(air.Capabilities.os.toLowerCase().indexOf("win") > -1) {
var file = air.File.applicationDirectory;
    file = file.resolvePath(
var nativeProcessStartupInfo = new air.NativeProcessStartupInfo();
    nativeProcessStartupInfo.executable = file;

else {
var mono = new air.File();
    mono = mono.resolvePath(
var exeFile = air.File.applicationDirectory;
    exeFile = exeFile.resolvePath(
var args = new air.Vector["<String>"];
var nativeProcessStartupInfo = new air.NativeProcessStartupInfo();
    nativeProcessStartupInfo.executable = mono;
    nativeProcessStartupInfo.arguments = args;

This handles Windows, OS X, and should handle most distros of Linux; the location of the mono executable is the tricky part, Adobe Air doesn’t read the path environment variable, so the exact location of mono must be specified. mono is usually in /usr/bin, but custom distros, installations, etc. could put it elsewhere.