Posts about Uncategorized

completions breaking on zsh upgrade

December 4th, 2008

If you upgrade zsh and suddenly find that certain completion functions are breaking and throwing up all over your terminal, remember to delete ~/.zcompdump.

For instance, when I upgraded one of my systems from 4.3.4 to 4.3.9, I would get the following error whenever I tried to complete a command name:

alternative:69: command not found: _path_commands

This gets me every time.

examining a dynamically loaded iframe in Selenium

December 2nd, 2008

Nothing too exciting here, just something I was chewing on for a while and wanted to write down. I’m testing a page that uses GreyBox to display modal windows. GreyBox puts the content in an iframe, so you have to do a little finagling to get at it. Most of the selenium rc methods that handle frames seem to require me to actually know something about the frame I’m looking at, like an id or a name or something. I dunno any of that crap, just use that damn iframe there.

Anyway, select_frame (I’m using the python bindings here) lets you use the “index” locator, so you can jump right in to the first frame. Then to get back out, there is the “relative” locator that lets you just move up one level. You end up with something like this:

# do stuff in the main window here
sel.click("the link you're clickin")
sel.select_frame('index=0')
# do stuff to the iframe here
sel.select_frame('relative=up')
# you're back in the main window

I don’t have all that solid a grasp on what’s going on around here, so I’m sure this only works in whatever bizarre edge case I have set up. Whatever, hopefully google will direct some poor soul here and I will end up making his day just that much brighter.

helvetireader list view css update

December 2nd, 2008

Here is an update to the CSS I posted the other day for tweaking Helvetireader.

#selectors-box, #add-box { display: none; }
.entry { -webkit-border-radius: 0 !important; -moz-border-radius: 0 ! important; }
.entry .collapsed { padding: 2px 0 2px 0 ! important; }
.entry .collapsed .entry-secondary { margin-top: 1px !important; }
.entry .collapsed .entry-original { margin-top: 2px !important; }
.entry .collapsed .entry-icons { top: -4px !important; }
.entry .collapsed .entry-date { margin: 0 30px 0 0 !important; padding: 1px 0 1px 0 !important; }
.entry-actions { height: 1.2em !important; padding-top: 0px !important; }
.entry-actions:hover { padding-left: 25px !important; }

I forgot to even mention in my last post, but the real reason for needing most of this is that I’m using Reader in list view, instead of expanded view as is intended. I think the only real difference you might see using this css in expanded view is that you won’t get the nice rounded corners around each entry. Unless there’s a CSS selector for matching the parent of a certain element, I don’t know a practical way to preserve the corners. I also never use expanded view, so I don’t care.

Helvetireader

November 29th, 2008

I use Google Reader a lot, and lately I’d been feeling somewhat frustrated with its use of space. It is the means through which I consume the majority of my online information, and I wanted it to be a little more efficient about presenting that info.

So, I was very happy to discover Helvetireader, a Greasemonkey script for applying a much more minimalist style to Reader. It removes many of the UI elements, forcing much wider use of keyboard shortcuts. I was already a big fan of Reader’s keyboard shortcuts, and Helvetireader prompted me to get familiar with a few others that I hadn’t even thought to look for.

At the moment, the script just adds two elements inside the page’s head tag — one link tag to change the favicon, and another linking to the stylesheet. I have been tweaking the script a little to get things a little more how I like them. What I did is just add a style element, define its InnerHTML, and append it as a child to the head tag. I put my tweaks inside a new userscript, but you could just as easily edit the Helvetireader script. Just make sure that your adjustments come after Helvetireader’s CSS.

So, the javascript I have for adding the style tag looks something like the following:

var newStyle = document.createElement('style');
newStyle.type = 'text/css';
newStyle.innerHTML = "CSS GOES HERE";
document.getElementsByTagName("head")[0].appendChild(newStyle);

The biggest thing that I wanted to change was removing the links above the feed tree. It takes up like half the height of the page and I never use any of them. Even with the browser window maximised, I could only see a tiny subset of my feeds. You might say that I was mad as hell and not going to take it anymore. Luckily, fixing this was a simple matter:

#selectors-box, #add-box { display: none; }

In list view, the little star icon was kind of off center, and the date overlapped with the icon on the right. The star icon being low also made the whole bar taller than it should have been and the top of some of the text underneath was being exposed. The following fixed that:

#entries.list .collapsed .entry-icons { top: -5px ! important; padding-bottom: 5px; }
.collapsed .entry-date { margin: .2em 30px 0 0 ! important; }

When an article is expanded, the options at the bottom only show up when you hover over them. They also overlapped with the little gear icon. I think they might have been pushed down a bit or something as well. As is typical with CSS that I write, I’m never quite sure what is actually necessary. I tend to just get stuff working, maybe pare down a few really obvious things, and then not mess with it. So don’t take any of this as authoritative, it’s just stuff that seems to work for me.

.entry-actions { height: 1.2em ! important; padding-top: -0px ! important; }
.entry-actions:hover { padding-left: 25px ! important; }

Unfortunately, Javascript doesn’t have nice multi-line strings or heredocs, and I didn’t really feel like putting all of my CSS on one line. So, I cheated a little like so:

newStyle.innerHTML = "\
#selectors-box, #add-box { display: none; }\n\
#entries.list .collapsed .entry-icons { top: -5px ! important; padding-bottom: 5px; }\n\
.collapsed .entry-date { margin: .2em 30px 0 0 ! important; }\n\
.entry-actions { height: 1.2em ! important; padding-top: -0px ! important; }\n\
.entry-actions:hover { padding-left: 25px ! important; }\n\
";

Not ideal perhaps, but not too terrible, I’d say. And that’s usually good enough.

I’ve only been using this for a day or so, but I’m really liking it so far. I suspect that I would probably feel the same even if I didn’t have a huge fetish for Helvetica.

EDIT: updated css

forget that

August 18th, 2008

That twitter digest plugin was a nice idea and all, but it kind of loses its effectiveness when you never post for real. Also, it didn’t seem to understand how dates work.

Super-Late Wizard World Round-Up

July 12th, 2008

I went to Wizard World Chicago a few weeks back, and bought a few things. I just haven’t gotten around to posting pictures, mostly for lack of a digital camera.

fox_dmz

The main thing I purchased was a page from Nathan Fox’s run on DMZ. For comparison, you can see the final, colored and lettered version here, it’s page 15 from issue 18. You can sort of get a sense of scale from the paperback holding down the end, but the page is 16″x24″, quite a bit bigger than most artists work at. His prices were really good, especially considering how detailed his work is. Aside from DMZ, he had pages from Pigeons From Hell and the Batman Black and White issue that he did. I’ve never read any Pigeons, but the art looked damn good.

cheeseburgerZatanna by Art Baltazar

Art Baltazar was there as usual, looking totally ridiculous. I think he was wearing a homemade Superman shirt, along with some kind of hat that seemed to be made of strips of black cloth sewn together. For some awesome reason I don’t quite understand, he only charges $1 per character for sketches. I got one of Zatanna because I’m cool like that, as well as a totally awesome painting of a cheeseburger. The painting is stretched canvas on a wooden frame, but only 2″x2″. I’m fairly proud of it.

smarto_zatanna

The last thing I picked up worth noting was another Zatanna sketch from a guy named Luke Smarto. To be honest I don’t have any idea who he is, and don’t even think he’s done any books, but inked and toned, the sketch was only $10. Quite the bargain. I don’t usually even bother looking too hard at artists that haven’t worked on anything I’ve read, but the example sketch he had up on his table was of Zatanna, so I knew we would be able to achieve a meeting of the minds.

I also got a couple books, filled in some gaps here and there, but nothing too impressive. I was a little less than enthused about going at first, but things turned out pretty well I thought.

iphone

July 12th, 2008

well, I broke down and bought an iphone 3g. It’s pretty sweet, honestly. There’s not really much else to say, I haven’t done anything with it yet. More as the situation develops.

I have a stupid bicycle

July 10th, 2008

I ran over my own crank arm on the way to work today.

humpty

July 3rd, 2008

I don’t quite understand why anybody thought that any of the king’s horses, much less all of them, would be any help at all in putting Humpty Dumpty back together again.

fWordplay Friday

June 27th, 2008

Are there any words that change pronunciation and/or meaning with just a change in capitalization? The only ones I know are polish/Polish.