Computers

LSCOLORS/LS_COLORS: Now with Linux Support

A while back I made a little web page to spruce up ls output. Of course I completely forgot about it until recently. Some of Ubuntu’s default colors were hard to see in Terminal.app, so I added mostly-working LS_COLORS for Linux. The string format is completely different, and harder to go from text to preview, so I ditched that feature. Linux people will have to copy-paste the color string and type ls in their terminals. Life’s tough, I know.

Anyway, try it out.

Once you’ve got a theme you like, try the following for BSD/OS X:

LSCOLORS="exfxcxdxbxegedabagacad"
export LSCOLORS
alias ls="ls -G"

or on Linux:

LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:"
export LS_COLORS
alias ls="ls --color"

Apparently just setting an environment variable called LS_COLORS doesn’t mean you actually want ls to print in color. You have to set up the aliases as well. Add the lines above to ~/.bash_profile (or .profile if you’re a ksh user) to make the change permanent.

One thing I learned: Linux’s color string is much more powerful than BSD’s. Linux’s ls lets you choose more colors, blinking text, and backwards text. It even lets you specify color settings for specific file extensions in addition to general types of files. Support for all those extra features will have to wait until forever. I use color information sparingly. Too many colors is just as useless as no color. If you want to get fancy, this guy has some helpful info.

Computers

Comments (3)

Permalink

New Bloglines Feature: Videos in Feeds

For the past couple of months my greatest annoyance about Bloglines was that it stripped out all <object> and <embed> tags for security reasons. This is fine and good, except that most feeds embed videos using these tags instead of as RSS attachments. Google Reader has supported a whitelist of sites for over a year now. I finally got around to fixing the Bloglines security filter so that videos will show up. Below is the current whitelist. Any <embed> or <object> from these domains will not be stripped:

blip.tv
blogtv.com
blowery.org
break.com
brightcove.com
castfire.com
cnet.com
cnn.net
collegehumor.com
dailymotion.com
dotsub.com
ehow.com
google.com
gametrailers.com
gamevideos.com
glumbert.com
grouper.com
ifilm.com
jumpcut.com
kontraband.com
liveleak.com
metacafe.com
mobatalk.com
monstersandcritics.com
motionbox.com
myspace.com
podtech.net
podshow.com
revver.com
reuters.com
sapo.pt
singshot.com
slideshare.net
ustream.tv
verycd.com
videoegg.com
vimeo.com
vsocial.com
youtube.com

I made this list by asking my co-workers for video sites. If I’m missing something, post a comment and I’ll throw it on the TODO list.

Oh, and the obligatory demonstration of this feature:

Computers
Videos

Comments (1)

Permalink

Ask.com Search Suggestions

I’ve noticed the search suggestions on Ask.com are a little… preoccupied with a certain topic:
How to
How do I know
si
e
v

I know medical searches are increasing, but this is a little ridiculous.

Computers

Comments (0)

Permalink

Karma

While I was stuck in an airport Sunday, I spent an hour or so working on a clone of Bjorn’s Karmerd (link not available because Bjorn took down all his stuff). He has stopped development since getting frustrated with a BerkeleyDB incompatibility. Basically this web app allows you to increase or decrease an integer associated with a name. Try it out. It’s totally useless, but it’s fun to waste time and/or brag about your score. One thing I really like is how it shows off Rails’ simple URIs. You don’t even really need hyperlinks between pages when URIs look like /karma/up/blah. As usual, all code is in a public svn repo. I’m always impressed by how Rails handles escaping HTML, JavaScript, etc. Instead of having to write or even use a bunch of methods, it just takes care of the data munging behind the scenes. I suspect the only problem with this database will be spam, since it is so easy to create an entry. I hate CAPTCHAs with a vengeance, so I’m definitely not going to add something like that. If things get too bad I guess I’ll block some IPs and/or reset the DB, so don’t be depressed if your karma disappears. Another option would be to cease showing things with a score below some threshold, that way users can get rid of spam (and annoy their friends) and I can sit back and be lazy.

On an unrelated note, Sea-Tac lacks free wifi. This wouldn’t be a problem except that EDGE is filtered heavily as well. Outgoing packets not addressed to port 80 get dropped. HTTP on other ports does not work, IMAP and POP don’t work, not even ssh or telnet work. My direct flight from Spokane to San Jose turned into a flight through Seattle to San Jose, which turned into a delayed flight, which turned into a cancelled flight. After getting on a later plane to SJC, that flight was delayed and I got in much later than I expected (without my luggage). For all the annoyances I had to put up with, I wasn’t compensated at all. Alaska used to at least offer free alcohol on flights delayed over 30 minutes. Guess I’m flying Southwest next time.

Computers

Comments (0)

Permalink

Bloglines Beta

This evening we finally launched Bloglines Beta, a redesign of the once-popular news reader. It’s been the largest and most visible project that I’ve had a hand in, and I’m pretty happy with what has been accomplished so far. Pretty much all of the reviews are positive. Obviously not all the features are there yet, but it’s nice to get some praise for the hard work.

Computers

Comments (0)

Permalink

Controlling X10 Appliances with the iPhone

Last week I ordered some X10 gear off Amazon to play with. Included was a CM17A Firecracker X10 controller. It plugs into a serial port and transmits X10 signals to a receiver hooked up to your power lines. I found a neat little open source program called Heyu that lets you control the CM17A. Of course, controlling your X10 stuff from a command line isn’t cool enough for me, so I started on a Ruby on Rails app that lets me control everything from my iPhone. After adding some iUI styling it works pretty well. The Firecracker can only transmit, not receive data, so I had to store appliance state in the database. Besides that minor annoyance, everything worked out pretty well. I added iUI styling and I’m pretty happy with what I’ve got so far.

Anyone who wants to can check out the source here. It’s nowhere near done. There is no way to add houses or units short of making a migration or modifying the database directly. Also it requires that you have Heyu installed and in your path. Turning stuff on and off works though, as demonstrated by me in this video:

You can download it here if for some reason you want to.

My favorite thing to do so far is to turn off my air conditioner in the morning and then turn it on an hour before I come home in the evening. Since my schedule is so unscheduled, a cron job just doesn’t cut it.

Computers
Videos

Comments (2)

Permalink

iBloglines 2.0

Now with search, bitches.

Honestly, no other readers besides Bloglines have a decent iPhone site. NewsGator is an example. After using it for approximately 30 seconds on my iPhone, I noticed the following:

  • Formatting is terrible. It looks exactly like NewsGator designed and tested their iPhone site on a full-blown Mac in Safari. Every feed title takes up approximately three times as much vertical space as it should. Site names wrap, but only the first line indents. Even the default packs have this problem. If you’re going to waste space indenting stuff, at least be consistent and indent all of it.
  • Timestamps are below item text. You know, so you can try to guess when an article was published based on its content.

  • iUI’s JavaScript animations are enabled. Although they look cool on a PC, the iPhone animates them at about three frames per second. This means pages take at least an extra second to load, because you have to taste the bitter eye candy. Again, this is probably because nobody at NewsGator tried to use their site on an iPhone.

  • NewsGator shows 20 items per page, meaning pretty much any feed worth reading (and many that aren’t, such as Digg) force you to scroll like crazy. This wouldn’t be so bad except for…

  • …marking unread/read sucks. There’s no way to mark all items on the current page as read. Items default to unread and you must manually mark each one or press the “All Read” button. Instead of marking everything on the current page read, All Read marks all unread items in the feed, including ones you could not have possibly seen yet. Larger items are collapsed, but if you expand them they are not marked read. So if you’re actually reading any feed with more than a few sentences of text, you have to click twice for every item.

    Scrolling all the way to the bottom (which takes a while, see above) and clicking next doesn’t mark anything read. The three main problems…

    1. Items default to unread.
    2. Going to the next page does not mark the last page read.
    3. Clicking All Read marks every unread item in the feed.

    …create a trifecta of unusability. I have no clue what they were thinking when they made this– actually I do. It was, “Deploy an iPhone version of our site so we can get press.”

  • There are no site favicons. This is a big one for me as many of my favorite feeds have their own favicons. Why even put the syndication icon there if every feed has it?

  • No sharing/e-mailing items. The iPhone has an e-mail client and understands mailto: just fine. It would be so easy to add this.

  • No blog search.

For some reason NewsGator thought this was worth a press release. A lot of companies wouldn’t even deploy something this bad.

Computers

Comments (0)

Permalink

iBloglines

At the start of the week one of my coworkers got an iPhone and started tinkering with iUI. It didn’t take long for an iPhone version of Bloglines to come about. Over the next few days the team polished it up and deployed it. You can try iBloglines out here. It should work alright in Firefox and Safari, but it really shines on the iPhone. I’d say it’s better than the current mobile Bloglines, but of course iSafari can do XMLHttpRequests. Not bad for rapid application development in C++.

The following screenshots were taken in iPhoney, so they don’t get rid of the tool bar like on the iPhone:

iBloglines Feed List

iBloglines Items

iBloglines End of Item List

Computers

Comments (0)

Permalink

Nike++

I got tired of Nike’s flash-based UI and I wanted to learn Ruby on Rails, so I’ve started work on a little RoR web app that allows people to create accounts, upload Nike+ XML files, and view their runs. To view an example, just log in as geoff with the password geoff. This thing is definitely a work in progress, but if you want to screw around with the code you can download it here. The easiest way to deploy and test everything would probably be to just generate a generic Rails app and then copy the app directory over. If you want to try uploading runs but you don’t have an iPod sport kit, use the XML files here for testing.

Computers

Comments (0)

Permalink

XML Parsing in Ruby

I've recently started learning Ruby (and Rails) after seeing a coworker use RoR to quickly throw together a web app with all the goodies: AJAX, MySQL backend, pretty Web 2.0 theme, etc. I've gotten rather tired of Nike's flash-based web app for their iPod sport kit, so I decided parsing the XML files on my iPod Nano would be good Ruby practice and familiarize me with Nike's XML. I threw together a quick script that parses the Nike+iPod data and prints it out. You can get it here. If you're too lazy to copy one of the XML files off your iPod (or too lazy to run, or too poor/nonconformist to buy an iPod, etc), I've also got a test file. I haven't tried XML parsing in too many other languages, but Ruby makes it pretty easy. Iterating over a bunch of the same kind of elements is very handy. I'm working on turning this into a full web app that lets you upload XML files and track your runs (basically a version of Nike's website without the suck), but I don't think it's ready yet. When I get it closer to done I'll make the SVN repo public and set up a production copy.

Computers

Comments (0)

Permalink