Monthly Archive for November, 2006

The word ‘collocutor’ is spelled: ‘collocutor’

Just in case you were wondering.

collocutor: One of the speakers in a dialogue.

A list of government/NIST NTP (time) servers

Here is a list of NIST NTP servers.

Multiplex several ssh sessions over a single TCP connection

Simon (gotta love that photo) informs us:

There’s a nifty feature in openssh that lets you multiplex several ssh sessions over a single TCP connection. The first time you connect to a host it sets up a regular ssh connection, and creates a unix socket on a local filesystem; subsequence sessions get tunneled over that connection, without having to do all the heavy duty key exchange, etc.

To enable, add the following to your ssh config file (typically ~/.ssh/config )

ControlMaster auto
ControlPath ~/.ssh/control-master/%r@%h:%p

Create a directory to hold the local sockets

mkdir ~/.ssh/control-master

Test by connecting to a host from one window, then, without logging out, start another window and connection to the same host. The second one should start up a lot faster.

Documentation for Ruby exceptions per-method?

Is it just me, or does the Ruby documentation not include which exceptions a method might throw?

In order to find out what ios.write throws when it cannot write to the specified path, I had to break it on purpose and look at the output!

Multiple Arbitrary Simultaneous Carets (MASC) — a very handy TextMate Bundle

Here’s a small and handy TextMate bundle, Multiple Arbitrary Simultaneous Carets.

I’m not sure if I’m using the best TextMate Bundle terminology, but this is how I would describe it: it lets you insert multiple cursors and then enter text at all of them at once, just like the behavior that is built into traditional pre-structured TextMate Snippets.

That page also has a screencast demonstrating its capabilities. Check it out.

One-liner for deleting all unknown files from an SVN working copy

Have an SVN working copy that looks like this?

$ svn status
? projectname.tmproj
? svncommitconflict.tmp
? app/controllers/unneedefile_controller.rb
? app/views/notneeded
? tmp/sessions/ruby_sess.be20aac7aff763cf
? doc/all
X vendor/rails

$

Clean it up with this!!

$ svn status |grep ? | cut -c 8- | xargs rm -rf
$ svn status
X vendor/rails

Performing status on external item at ‘vendor/rails’
$

Be careful to not wipe out files you need. For example while figuring out this command I deleted my TextMate project file. Doh! I wish I had told SVN to ignore it, using svn propedit svn:ignores ..

Saft - add functionality to Safari

I want to mention a program I use that I really love: Saft. Saft is a Safari plugin which ads many many features that you always wish Safari had. It integrates with safari so naturally, you begin to forget which features come standard with safari and which are from Saft. Dragable tabs, savable tab sets, session saving and crash protection when restarting the browser, and ad blocking, just to name a few. Try it out.

My voting experience

This morning as I was getting ready to go to work, I got a text from my friend in Texas: “are you voting today?”, which, because I know her, means “don’t forget to vote today!”. And I had actually forgotten that it was voting day. So I texted her back “I had forgotten! How did you know?!”. She replied “I’m standing in line waiting to vote and texting people reminding them”. Nice! Utilizing her free time she was influencing elections nationwide!

So I went to my voting location, which is 1 small block away from me, in the gymnasium of a senior center. Yes, that’s right, there is a senior center a block away from me (in the east village in New York) that I had never seen, and in it there is a small gymnasium. Sandwiched between apartment buildings. I guess any given building could have a small gymnasium hiding within.

I went to vote, where there was a little voting station for one of several “election districts”, which I found interesting. This relates directly to issues on which I am trying to educate myself for the structuring of WikiBallot. I guess the election districts are small enough around here that there are several in a given voting location.

The voting machine was awesome. The whole thing has a presence similar to a cigarette vending machine. First, you move this very impressive 4 foot long red metal lever from the far left to the far right. The ballot is a huge grid, with offices on the Y axis and parties/candidates on the X axis. You flip little metal switches next to each candidate that you select, and a little metal “x” pops into place. When you are done, you move the massive red metal lever back to the left.

I strode out of the senior center, filled with that self-righteous voting glow that you are allowed to feel 1 day every 2 years, and figured my glorious voting morning had drawn to a close.

I was wrong.

While walking to work up second avenue, from 12th street where the senior center was, I saw approaching me a group of school kids, maybe 15 of them, ages around 10 or 11 I think, and a couple chaperons. They were all smiling and having fun and one of them was holding a big sign that said “VOTE TODAY” or something. I thought it was cute, they were going around doing abstract voting encouragement. As I crossed paths with the group, one of them said “Did you vote today?!”. I smiled and said “yes, I did!” and maybe gave a thumbs up, expecting them to say “whoo hoo! democracy!” and keep walking.

Instead, the entire group of children ground to a halt and swarmed around me, with me exactly in the center of all of them, the chaperons on the perimeter.

One of them said “you voted!! have a cookie!!”. The angle of my head and the focus of my eyes were still recalibrating to being very near to a swarm of humans who were 2 feet shorter than I. I frantically scanned for the origin of the voice and found it, smiling big, holding an open bag of homemade cookies toward me. “Wow, thanks!” I said as I took a cookie.

And then, everything else came so fast, I’ll try to see if I can scrape together some semblance of a coherent story from the fleeting memories of concepts and sensations that came raining down upon me.

“Here, have another cookie!!” said another kid. I gladly accepted the offer.

“Here, have a brownie!!” said yet another. I took a small individually plastic-wrapped homemade brownie out of his bag.

“You voted today so you get one of these!!” And I was presented with a piece of paper, the exact wording of which I don’t know right now because I left it at work [update: see image below], and taped to the bottom of the paper was a lolypop. I’m not sure if they were intended to give those out or hang them up, but I view it as a voting certificate of accomplishment.

voting encouragement poster with lolipop taped to it

Click for larger version

“Don’t forget your sticker!” said another kid as a “I voted today!” sticker was placed on my coat. I should note that this was a sticker made from a printed out message taped to a standard adhesive name tag.

"I voted! and made a difference"

But that wasn’t all.

“Do you want to hear our song about voting?”

Oh yes, yes I did.

“Okay, you guys ready?” said one girl as 2 others lined up — yes, lined up in front of me on the sidewalk — swang side to side doing a dance routine, and sang:

dun, dun, dun dun dun, dun, dun dun everybody vote now!

If you didn’t already guess, it was to the tune of C+C Music Facory’s Gonna Make You Sweat (Everybody Dance Now).

“Wow, that was great! Thank you!” I said, and the crowd began to disperse, laughing and shuffling along. Flabbergasted, and smiling ear to ear, I rotated back in the direction of work– and was surprised to find two students remaining near me on the sidewalk, a boy and a girl.

“She’s giving free hugs to people who voted.” He informed me, smiling big. She was all smiles as well, and very sheepish, as she gave me a brief little hug, her hands pressing into my long wool coat. I gave her a pat on her shoulder, “heeeey, thanks”, and they ran off to join the others.

And just like that, they were blocks away. I found myself alone again, walking to work. Changed.

My great experience with Regal Cinemas Union Square theater in New York

I just wanted to quickly mention that I had a great experience with Regal Cinemas Union Square, a theater here in New York. Me and some friends got tickets but couldn’t find seats even remotely near one another, and the people at the customer service desk were extremely kind and efficient in fixing the situation (for obvious reasons I won’t say exactly how they helped us). These people are treating customers right and I’m sure are reaping the benefits.

Customer service: A+
$17 2-medium-drink-1-large-popcorn-combo (I’m not kidding): D (not an F because hey– it’s delicious, and has free refills)

Ruby class, Class, and Module

irb(main):030:0> Class.class
=> Class
irb(main):031:0> Class.superclass
=> Module
irb(main):032:0> Module.class
=> Class
irb(main):033:0> Module.superclass
=> Object
irb(main):034:0> Object.class
=> Class
irb(main):035:0> Object.superclass
=> nil

So, should this (in particular the parts in bold) blow my mind, or is it just a standard Chicken-Egg situation that exists within the fundamental constructs of any programming language?

I know that for the most part I’ll never have to worry about what’s going on here, but I’d like to explain it to myself once before I forget about it.

  • Are any of these defined (or definable) by Ruby code?
  • What would be a “more accurate” name for the class Class? ClassDefinition? HumanRelevantClass?

UPDATE: okay, ri Class informs me that there is such a thing as a “meta-class”. Knowing that this exists and that I’m not going crazy satisfies me for now. In the future I may read up on the concept further, starting with this article.




Close
Powered by ShareThis