intertwingly

It’s just data

WebSocket Demos


W

chat implements a shared textarea field across multiple clients.  Demonstrates bi-directional communication.

diskusage is more typical of my usage.  The du command produces tabular output that the user may want to sort different ways and yet is may take considerable time to complete.

Wunderbar on Rails


W

Usage: add wunderbar and nokogiri to your Gemfile and run bundle install.  Template extensions supported are _html and _json.  Examples: view, layout, json.

Note that as Rails layouts and views are predicated on the assumption that output is produced by concatenating text, one must use _ yield instead of simply yield.  On the plus side, Wunderbar will note when the first argument to a call which creates an element is html_safe? and will treat it as markup.

...

Wunderbar now does Sinatra


W

Demo

The result is a lot like Markaby, except you get to be/have to be explicit when you are creating a tag.  In this demo, there is no logic, so the benefits of doing so are less clear, but include you being able to use tags that aren’t known to Markaby, like the ones that were added in HTML5.  Both inline and views are supported, but support for layouts has yet to be added.

Future plans include Rails.

...

Hacked


This site was hacked.  A reader of the site noted that Google’s index of this site had been co-opted by dubious pharmaceutical offerings.  I’ll gladly thank that individual publicly if they give me permission to do so; but my email reply got bounced as spam.

The immediate culprit was the addition of the following lines to a number of .htaccess files

...

Improved Wunderbar JSON support


W

I’ve integrated jbuilder like functionality into Wunderbar.  Key differences?  A DSL that doesn’t suck, and output that isn’t ugly.

To harsh?  You be the judge.  Compare jbuilder ("json dot bar json bar json dot child bang") vs Wunderbar ("underbar underbar underbar underbar").

As to the output?  Don’t be fooled by the jbuilder readme.  In actuality is no unnecessary whitespace in the output.  That’s good if you are bandwidth limited.  Not so good when viewing the XHR traffic via firebug...

Keeping it on the Rails


It is increasingly becoming the case that Agile Web Development with Rails is being actively co-developed with Rails itself.

While my tests have been an official part of the release process for a long time now, yesterday’s release of 3.2.3RC1 provides a number of examples that illustrate this.

The intent is to prove an updated to the eBook free of charge which incorporates the necessary changes, either concurrent with the final release of 3.2.3 or shortly thereafter.

...

Hearing Aid


I now have an open fit hearing aid device for my left ear.  That ear has experienced tinnitus for approximately 10 years.  An ABR test given at that time found nothing.  My hearing loss is primarily in the 2000 Hz and above.

Last night, I went to dinner with my wife in a noisy restaurant and I could hear every word she said.

Your Next Desktop Could be a Phone


Henri Sivonen: This getting interesting: Using an Android phone as an Ubuntu desktop when docked

Definitely Want.

Especially love the idea of sending and receiving texts from my desktop.  Would prefer a dock the size of a mac mini with a hard drive, USB and ethernet ports.

Mulligan


Dan Webb: I’m in charge of undoing twitters hashbang URLs

+1

OpenID upgrades


As a part of my server move, I’ve upgraded my consumer logic to Python openid-2.2.5 and provider from phpMyID to SimpleId 0.8.1.  In theory, I should now support OpenID 2.0.

The one small API change I noted in this process is in the consumer.  server.complete now needs an additional returnto parameter.

WunderWiki


W

I added a simple wiki as a demo for WunderBar.  It demonstrates shelling out to handing multiple URIs, handing get/post, dealing with both unescaped text and markup, shelling out to commands, AJAX, CSS, jQuery.

The demo relies on git and rDiscount to do the version control and markup processing.  It also doesn’t have all the features that you would expect from a wiki, such as conflict detection and resolution.

Twelve Steps


Jeni Tennison: it became clear that there were several places where having some kind of standard method for building a tree from non-well-formed XML would be beneficial...So the XML Error Recovery Community Group has been set up for this purpose.

On The Move...


Intertwingly.net is moving to DreamHost.  I’m sure that every one of my scripts has hard coded paths or depend on the server being in EST/EDT or will otherwise break for unanticipated (but in retrospect entirely obvious) reasons.  I don’t believe that I will lose any email in the process, but you never know.

My @apache.org email address will not be affected by this move.

Dominoes


Alex Russell: @glazou being entirely reasonable in the face of vendor-driven CRAZY (implementing other people’s prefixes): glazman.org/weblog/dotclea… Via @phae.

Alex, I think you need to move up the food chain a little.

The root-cause is vendor-driven advocacy directed at content producers which encourages them to produce compelling content using experimental features.  Everything else is consequences.  If you believe that those consequences are CRAZY, then you must conclude that the root-cause is CRAZY.

Default to Incognito


Patch for /usr/share/applications/google-chrome.desktop:

108c108
< Exec=/opt/google/chrome/google-chrome %U
---
> Exec=/opt/google/chrome/google-chrome %U --incognito
114c114
< X-Ayatana-Desktop-Shortcuts=NewWindow;NewIncognito
---
> X-Ayatana-Desktop-Shortcuts=NewIncognito;NewWindow

Wunderbar


W

Clearly if you want to develop a real web application, you need a router, a templating language, ability to separate out your model, view, and controller, scalability, and much more.

However, at times this is both too much, and yet not enough.  I find that I write a lot of scripts that do report generation, execution of shell commands, and the like, and in many cases would like to present a richer output than plain text: things like tables, fonts, and most importantly hypertext links.  I’ve been extracting some of the common logic from these scripts out into a library, and recently have started refactoring that library.

...

Port Forwarding


Problem: I’m not always at the machine that is VPN’ed into work.

Solution: place the following into /etc/network/if-up.d/sametime-forwarder:

#!/bin/sh
#
# redirect Sametime's port 1533 to messaging.ibm.com
#
echo 1 > /proc/sys/net/ipv4/ip_forward # turns on forwarding
iptables -F -t nat # Flush existing translation tables
iptables -t nat -A PREROUTING -p tcp --dport 1533 -j DNAT --to 9.17.136.77:1533
iptables -t nat -A POSTROUTING -j MASQUERADE

AWDwR updated for Rails 3.2


P P

David Heinemeier Hansson: there’s a brand new 3.2-compatible version of Agile Web Development with Rails.

This time, the release of Rails 3.2 and the release of the eBook were coordinated.

The President’s challenge


SOPA

Nat Torkington: Don’t wait for the time machine, because we’re never going to invent something that returns you to 1965 when copying was hard and you could treat the customer’s convenience with contempt.

Take action.

Bootstrapping Debian Unstable


It turns out that the following is all it takes to install Debian Unstable in a chroot jail under Ubuntu, and then to log into that jail as root:

apt-get install debootstrap schroot
mkdir /tmp/unstable
debootstrap unstable /tmp/unstable
chroot /tmp/unstable

...