Archive for the 'howto' Category

Wireshark

Wednesday, April 21st, 2010

Technical difficulty 4 You should know what http means and how to play a flv file.

Wireshark is my new Toy. Let me tell you why.

Ever try to save a Youtube video?

Save a streamed song or lecture?

In Canada, both actions usually are protected as long as it is for private or personal use. Practically, saving flash embedded content is a pain.

Aside It is possible to examine the browser cache directory or install plugins to intercept the embedded content. If that works for you great.

That is where Wireshark comes in. It is a cross platform network protocol analyzer based on Ethereal.

What does that really mean? Well it lets you examine the traffic coming into your computer, including the embedded content.

First grab Wireshark here: http://www.wireshark.org/

Next, install it and fire it up.

The following are instructions for capturing video from Youtube:

  1. Start capture on network card.
  2. Navigate to youtube video page, wait for video to completely load into the cache.
  3. Stop caputure on the network card.
  4. In the ‘Filter:’, paste ‘frame.len == 1434′, this should match the length of the segments of the video as it was downloading.
  5. Right click on one of the segments and click on ‘Follow TCP Stream’.
  6. This will assemble the TCP stream of the video with the headers.
  7. Click on the ‘Save As’ and save locally.
  8. Open a editor, like textpad and strip all the headers out of the top of the file.
  9. Test it in a player like vlc.

Similar steps are required for flash files.

For more details see my Wireshark notes.

Migrating from Xen-Fedora to KVM-Ubuntu

Thursday, January 28th, 2010

Recently I completed my migration from Xen / Fedora Core to KVM / Ubuntu. I have been a long time Redhat user, but I felt that Fedora was no longer stable enough for me. I was tempted to move to CENTOS but it didn’t feel right, not quite an ‘official’ Redhat release. So I decided on Ubuntu with KVM virtualization.

The transition was reasonably painless, a few adjustments to make, like using init.d instead of service. I made some notes for myself that others might find helpful:

Ubuntu Notes

Ubuntu KVM Host notes

Ubuntu KVM Guest notes

Import Facebook events into iCal

Tuesday, December 8th, 2009

Really simple tip, if you use Apple’s iCal (or Outlook, but I have not tested it see UPDATE) and want to import events from Facebook, simply click on the Export button above the RSVP box.

export-to-ical-circle

When asked to Open or Save, open it with iCal and it should prompt you which calendar to add the event too.

UPDATE: Outlook 2003 displays an error ‘Cannot import vCalendar file. Could not complete the operation. One or more parameter values are not valid.’ More current versions might work.

Also, you might consider adding alerts to these events once they have been exported to iCal.

Door Closer 101

Sunday, November 15th, 2009

Ever since I moved in, my apartment door always slammed shut. Recently I had a neighbor ask me ‘Why I slammed my door?’ I shrugged and explained that it was the door closer, not me.

Well guess what, you can adjust the closer. Shocking, I know.

Most closers have two screws, one adjusting the ‘sweep’ the other the ‘latch’ pressure. The sweep is the stage where the door is wide open and the latch is the last few inches, before hitting the latch.

door-closer

I had to adjust my latch screw, which was the bottom one in the picture. Some closers are labeled, mine wasn’t, so I guessed.

Turning the screw in slowed the door’s speed, turning the screw out increased the speed.

Now no more slamming doors and upset neighbors.

iPhone ring tones

Wednesday, October 21st, 2009

Want to use an existing mp3 file as a ring tone for your iPhone?

In a few steps you can.

  1. Choose your song in iTunes, right click, choose ‘Get Info’.
  2. Under the ‘Options’ tab there is a ‘Start time’ and ‘Stop time’, edit your song so that it plays only what you want. Don’t worry you can undo the Start and Stop times when we are done.
  3. Click ‘Okay’ to save changes to your Start and Stop times.
  4. Right click the song again and choose ‘Create AAC Version’. This will create a new file and add it to iTunes. You should see it right below your old file.
  5. Right click the old song and under the ‘Options’ tab reset the Start and Stop times.
  6. Right click the new song and choose ‘Show in Finder’ (or equivalent PC option).
  7. When you find this new file, rename the extension from m4a to m4r.
  8. Now delete the new file in iTunes, right click on the new file, choose ‘Delete’, then ‘Remove’ but choose to ‘Keep File’.
  9. Now drag your .m4r file back onto the Library icon in iTunes.

You’re done!

Reminder: make sure you are syncing your ringtones to your phone.

My dad’s ring tone is now Yakety Sax, I figure Benny Hill would be proud.

(Tested on iTunes 9.0.1 for OS X.)