Archive for November, 2006

brain thrashing

0

I have a horrible habit of remembering bits and pieces of all sorts of random stuff- this includes faces.

I may not remember your name or where I saw you but I’ll never forget a face.
Last night on Heroes they did a preview for episode 10- they had a 1 second flash of a minor character’s face that I recognized:

that guy on heroes

and I spent an hour last night trying to remember wtf he was from- unfortunately nbc didn’t have the promo clip up yet so I didn’t have the screenshot in hand.
Flash forward to tonight, when jackie and I get back from the store and she agrees to help me. I find the promo and spend 10 minutes trying to stop on the exact frame (they did a focus change to his face for that 1 second they showed him). Jackie instantly recognized him and attempted to look up his imdb entry, but once I saw she was looking under CSI, I knew exactly who he was- David the coroner’s assistant from CSI.

So while my memory was good, jackie totally surpassed me by knowing where he was from. Good job dear.

Useful Utility: tee

1

I have two requirements for a program being on this list: the first one is it has to be a utility- something scriptable or usable on the command line. The second is it also needs to have multiple arcane flags that I can write about, or just be so unknown that it’ll bring it to the attention of people that have never heard of it. Tee falls into the “never heard of it” group. It may only have two flags, but it’s useful nonetheless.

Tee splits a STDIN stream in two, sending one stream out output to a file, and the other to STDOUT. The data is identical; this just allows you to take a snapshot of what the data is like at a certain point a long piped command. For example, lets suppose you had a nice pretty command like this:

ls -lrt |awk '{print $6" "$7" "$8" "$3"  "$9}'|grep morgajel|tail -n 3

This provides you with the date, owner and filename of the 3 newest files in the current directory. Suppose you wanted a list for all the users as well as just morgajel’s latest three

ls -lrt |awk '{print $6" "$7" "$8" "$3"  "$9}'|tee all.txt|grep morgajel|tail -n 3

By adding the “tee all.txt” a copy of the stream at that point is diverted into a text file. you can view that later. The example is a bit fake, but you’ll eventually run into something needing this functionality. When you do, you can use tee. The only two real flags of interest are -a which appends data to the file rather than recreating it, and -i to ignore interrupts, but that could be really bad if you need to ctrl-c out of something…

either way, enjoy.

The Harassment of CoolGui

0

This happened a month or 3 back and I forgot to post it. we enjoy harassing each other, and I felt the need to share this with the rest of the world…

in #asp:
08:26 < CoolGui> dude
08:26 < CoolGui> I’ve had a fever since saturday
08:26 < CoolGui> Now I have these stomach cramps that won’t go away
08:27 < CoolGui> And all the doctor did was tell me it was probably a virus and call him if I didn’t feel better in a couple of days. 🙁
08:27 < morgWork> remember, whatever doesn’t kill you may just make you blind and crazy.
08:27 < morgWork> i.e. it could be siphilus
08:28 < CoolGui> That’s what I wanted to hear. 😛
08:29 < CoolGui> Can you get syphilis without having sexual contact to an infected person?
08:29 < morgWork> yes
08:29 < morgWork> I’m pretty sure
08:30 < CoolGui> google sent me here
08:30 < CoolGui> http://www.cdc.gov/std/Syphilis/STDFact-Syphilis.htm#WhatIs
08:30 < morgWork> you see the part about pustules?
08:36 < CoolGui> sounds nasty. I don’t think I have that.
08:37 < LanShark> dude
08:37 < LanShark> you jsut came back from europe
08:37 < LanShark> thats what you get
08:38 < CoolGui> I was fine over there
08:38 < LanShark> sure you were
08:38 < CoolGui> I think it was because I drank the water on the plane
08:38 < CoolGui> You know, the community water fountain
08:38 < LanShark> let me find the quote
08:38 < CoolGui> I’ve heard bad things about water on planes, now I’m starting to think it got me
08:39 < LanShark> [2006-08-18 15:51:18] <yojimbo |work> CoolGui: Looks like it’s your turn to get baked and wake up naked in an alley with a disease you can’t pronounce
08:39 < LanShark> hahahahahahahahaha
08:40 < CoolGui> haha.. yeah.. well I think it’s just a virus or bacteria or something
08:40 < CoolGui> Hopefully not a parasite
08:41 < CoolGui> I swear I think it came on in 6 hours or so though… so that eliminates most viruses that I know of… A lot of bacterial infections come on that quick though.
08:41 < CoolGui> Fuckin doctor didn’t feel the need to give me antibiotics though.
08:43 < CoolGui> hmm… Honestly it sounds like Staphylococcus aureus
08:43 < CoolGui> Doesn’t say drinking water there
08:43 < CoolGui> But it does have the short incubation period
08:44 < CoolGui> well it says that one usually only lasts up to 24 hours…. so probably not it
08:44 < CoolGui> could be salmonella though
08:44 < morgWork> CoolGui: make sure you’re not going blind…
08:45 < CoolGui> I can see okay
08:47 < morgWork> for now
08:50 < CoolGui> I have some antibiotics laying around I think I’m going to take them anyway
08:51 < morgWork> bad move slick
08:51 < CoolGui> don’t call me slick!
08:51 < morgWork> your syphilis will become resistant because you won’t take enough
08:51 < CoolGui> lol, it’s not syphilis
08:51 < morgWork> then you’ll have resistant syphilis.
08:53 < CoolGui> I have amoxocillin, penicillin and something else
09:00 < CoolGui> This stuff expired almost a year ago
09:01 < CoolGui> I have one digital thermometer that reports 101.2 and another that reports 99.9
09:01 < CoolGui> that’s a big fucking difference if you ask me
09:27 -!- alec_eso [~na@c-66-177-247-68.hsd1.fl.comcast.net] has joined #ASP
09:32 < morgWork> alec_eso: perhaps you can diagnose CoolGui
09:32 < morgWork> he was in amsterdam and now has a fever

I then message alec_eso
09:32 < morgWork > say it’s syphilis
and paste him the conversation up to this point

in #asp:
09:33 < alec_eso> that sounds like syphilis
09:33 -!- CooIGui [~CoolGui@cpe-24-167-19-99.houston.res.rr.com] has joined #ASP
09:34 < morgWork> CooIGui: damnit, you missed it
09:34 < CooIGui> sorry
09:34 < morgWork> CooIGui: please explain your sickness to dr alec_eso
09:35 < CooIGui> Had to reboot ye olde router
09:35 < morgWork> note that he is only a doctor of funk, not a medical doctor
09:35 < CooIGui> fever, headache, abdominal cramps, light sensitivity
09:35 < CooIGui> okay
09:35 < alec_eso> how long?
09:36 < CooIGui> 3 days
09:36 < CooIGui> well I’m on my 3rd day
09:36 < alec_eso> have you had any unprotected sex in the week prior?
09:37 < CooIGui> no
09:37 < alec_eso> have you used public toilets? unfamiliar toilets?
09:37 < CooIGui> yes
09:38 < alec_eso> where?
09:38 < alec_eso> any itching, swelling, painful urination? been going regularly?
09:38 < CooIGui> no
09:39 < CooIGui> er.. no and yes
09:39 < alec_eso> when you used those toilets, you use the paper covers?
09:40 < LanShark> hell no
09:40 < alec_eso> because if not it sounds like you have Capone’s Syndrome
09:41 -!- CoolGui [~CoolGui@coolgui.users.undernet.org] has quit [Read error: Operation timed out]

alec eso then messages me this:
09:41 <alec_eso> I told him Capone’s Syndrome
09:41 </alec_eso><alec_eso> (al capone died of syphilis in prison)
09:44 <morgwork> lol
09:44 </morgwork><morgwork> nice
09:46 <alec_eso> my next step is for me to get him to take a digital picture of his genitals so I can do a visual exam to rule in or out syphilis
09:47 <morgwork> lol

in #asp:
09:47 < alec_eso> well, I gotta go to class
09:48 < alec_eso> if he asks tell him I think it’s syphilis
09:48 < alec_eso> tell him to get a video camera and start documenting his life like michael keaton in my life because he won’t be around for his kids
09:49 < LanShark> wheres yojimbo, he gets the win if youre right
09:49 < morgWork> alec_eso: will do

ambrosia…

0

mmmm… one thing about being jobless and poor is I’m finding ways to save money. When jackie and I were in DC making lots of money and had no freetime, we ate out quite a bit. Now we’re looking for ways to cut costs and we’re looking for foods that we can make a batch of and eat over the course of the week- we can make a batch of stew and eat it for 3 or 4 days.

Stew is pretty good, but the shocker was burritos- I haven’t made homemade burritos in a year or two and forgot how cheap they were. on top of that if we make enough meat we can get it to last 3 or 4 meals easily for less than $20. Usually whenever we go out for a meal we spend $20-25, so this is a great deal.

On top of that, burritos are tasty- probably in my top 5 favorite foods. So what do we get?

  • shells
  • beans
  • meat
  • Lettuce
  • tomatoes
  • guacamole (homemade- avacado, garlic, cilantro, jalapeno, tomato, onion, lime juice, salt, pepper)
  • sour cream
  • cheese
  • onions

I eat 2 medium sized burritos and I’m good to go for the rest of the night.

The Baby’s Site

0

Jackie and I finally agreed on a name a week or three ago- “Ian Hawthorn Morgan”. We also bought the domain IanHawthorn.com for him- figured it was something he could take over when he’s old enough- it’s also gonna serve as a news center for family and friends. Jackie’s already set up a wordpress theme and started posting emails we’ve received and other such details.

I’ve revised my categories on this site and added one for ian when I mention him.

Ruby on Rails

0

So I’ve had this on again, off again thing with ruby for a while now. Since I first started playing with ruby it got pretty big with rails, and I completely missed that boat. Well, now I’m playing with rails and it’s fairly interesting once you get it up and running. I picked up the O’Reilly book Ruby On Rails and have been walking through it’s Photo project. I’ve went so far as to even throw it in a subversion repository in case I pooch something.

One thing I really like so far is the Scaffolding system- once you create an object model (say, a Photo) and have it generate the table to store it in, it can auto-generate the web interface to allow you to create/edit/delete entries without having to muck with it. The coolest part is if you make any DB changes, the interface is automatically updated. That was something I’ve always hated- updating interface code to reflect DB changes.
At DP I wrote a minor system to do something like that in ASP, but it was still pretty crappy (and dangerous). Dendrite had created a system at SPX called Skel which was hideous (his words), but did sorta the same thing. The main project I worked on there (before it was cancelled) was a replacement for Skel that was very similar to this, but for perl. Now I really wish I woulda kept up with ruby because had I known of rails, I could have essentially ported it to perl and saved a lot of time.

I’m hoping that the rest of rails is as cool as this scaffolding code. It’s taking me a while (5 hours broken up) to wrap my head around it, but it’s finally starting to make sense. I’m looking forward to finding out more about it.

I voted

2

Did you?

Go try, even if you’re not registered.

Go to Top