CSS menus

August 31, 2010 - 11:09pm
For the longest time I had been battling css menus with floating LIs. If the LI has within it normal text, instead of an image, each browser will indefinitely display the LI's with different widths because each font will be displayed differently. I either ended up usually giving fixed widths to each of the LIs, (which sort of defeated the purpose), or ended up with the entire menu being short of...

Learning Javascript Through Negative Example

June 24, 2010 - 11:09am
The last couple weeks I've spent learning a client-side Javascript application framework, sproutcore. In the process, I took the opportunity to take a refresher on my javascript skills. A decade and a half after the emergence of Javascript, there is still a tremendous amount of confusion, even among developers, between Javascript (an awesome scripting language that is built into web browsers)...

Read notes as html

June 17, 2010 - 3:04pm
I tend to keep a lot of notes around my ~/docs directory. They are formatted in Pandoc Markdown because it's easy to type and easy to read. However, sometimes the notes get fairly extensive, and it's nice to be able to read them as html in a web browser rather than in the terminal window. To that end, I wrote up this little tool that I call vah -- "View As HTML". All it does is orchestrate the...

SMS to Web

June 10, 2010 - 10:10am
I set out to find just some basic information about how text messages translate into website actions, and ended up with more information than expected. SMS is the term for short messages service, referring to a message being up to 160 characters, and being sent from a mobile phone, or (SME) to a short messages service center, (SMSC), stored, and then forwarded to another SME. A good diagram...

Filter a directory listing by characters

November 6, 2008 - 11:32am
In Bash, you can get a list of files filtered by a range or choice of characters in the filename by using character expansion. For example, to get a listing of just log files in /var/log ending in .1, .2, .3 and .4, use this command: $cd /var/log $ls -l *.[1-4] Or to just see the files ending in .1 and .4, use: $ls -l *.{1,4}

Open a directory in Mac OS X Finder from the Terminal

November 6, 2008 - 11:17am
From the Mac OS X Terminal application, you can open the Finder to any directory you wish by typing: $open <directory name here> For example, to open up the current directory in the Finder, type: $open . or the apps directory: $open /Applications

Bash Shell Quickies

October 9, 2008 - 9:50am
CTRL-C : cancel the line you are typing CTRL-D : log out CTRL-R [word] : Search command line history for a command matching [word]. Keep typing CTRL-R to cycle thru all matches. CTRL-L : clear the terminal screen

show all process information with ps

July 16, 2008 - 1:10pm
$ps axww The a option displays all process information other than your own. The x option displays process information for those with no terminal; in other words, daemons and such. The ww option tells ps to display all process information regardless of the window size. Info will be wrapped to the next line and not cut off like normal. Ps is useful for getting information about what and how...

Old Greenwich Traffic Calming

July 16, 2008 - 12:50pm
My neighbors have banded together to implement a traffic calming program on our streets. Read the about the goals and progress of our efforts on the Old Greenwich Traffic Calming site.

How to find listening tcp processes

July 10, 2008 - 9:36am
Sometimes you need to know what services are listening to what ports on your unix box. Two utilities that can get you some of this port and process information are netstat and lsof. With netstat, you can find out which services are listening under which ports: # netstat -na The n option prevents ip to hostname lookups. The a option adds to the output the sockets used by server processes. Part...