Skip to main content

Posts

Showing posts from August, 2011

Humor: Millions of Microprocessors

Today I ran "fortune", and I got:I went to my first computer conference at the New York Hilton about 20 years ago. When somebody there predicted the market for microprocessors would eventually be in the millions, someone else said, "Where are they all going to go? It's not like you need a computer in every doorknob!"

Years later, I went back to the same hotel. I noticed the room keys had been replaced by electronic cards you slide into slots in the doors.

There was a computer in every doorknob.
-- Danny HillisAside from the fact that that's an awesome quote, I'm pretty excited about this because Dannis Hillis was one of the founders at a company I worked for (Metaweb).

Linux: Vim Freezing

I had a problem with Vim freezing, and I finally figured out why. If you log into a Linux machine with X11 forwarding turned on, but without an X server, vim hangs when you try to start it. So do various other commands.

I recently switched from an Ubuntu laptop to a MacBook Pro running OS X. In my .ssh/config, I had:Host my-server-name
ForwardX11 yesWhen I sshed in from my Linux box, things were fine. However, when I sshed in from my Mac, things were broken. There are three workarounds:Don't enabled X11 forwarding. X11 forwarding is enabled for ssh by either the -Y or -X flags or by the ForwardX11 configuration variable.If you do enable X11 forwarding, make sure you start an X11 server first and then log in with a fresh xterm or terminal window so that the DISPLAY environmental variable is properly set.Pass -X to vim so that it doesn't try to connect to the X server. Vim will not be able to alter the window title or the clipboard. It was surprising to me that vim will…

CSS: Fading Clipped Text

CSS has a feature, "text-overflow: ellipsis;", that works really well when you want to clip a piece of text and replace it with "...". However, it only works for a single line of text. It doesn't work when you have a paragraph of text, and you want to clip all the text below a certain point.

This is a problem I've struggled with a couple times. I've always wanted to figure out how to have the text fade out at the bottom of the box. Before now, I've aways just clipped the text at the bottom of the box; that looks ugly since most of the time, the text is vertically clipped in the middle of a sentence.

During a recent HTLM5 Hackathon at Google, I learned about gradients and masks. After about 45 minutes worth of futzing around, I finally achieved the effect I was looking for. Here's the code. It basically puts a mask over the text with a gradient that makes the text fade out.<!DOCTYPE html>

<html>
<head>
<meta ht…

Linux: VNC Stopped Working

I have been using VNC to connect from my Ubuntu box to an OS X box. On the Ubuntu side, I was using vinagre, which is the standard "Remote Desktop Viewer" application. On the Mac side, I was using standard desktop sharing.

Things were working for months, but they stopped working for me the other day. I could connect just fine, but I could only see a black screen. Apparently, this is a known issue.

Switching to Remmina (sudo apt-get install remmina) fixed the problem.