Create ISO and DVD from VIDEO_TS folder in Linux

On ubuntu systems, you'll need the following packages: genisoimage and dvd+rw-tools.

If you have a folder named "mydvd" in your home directory containing a VIDEO_TS folder, cd to your home folder mydvd, then run:

cd ~
mkisofs -dvd-video -o mydvd.iso mydvd

This will produce a mydvd.iso file. To verify, run

isoinfo -l -i mydvd.iso

At this point, you don't actually have to create a DVD. As a commenter pointed out If you have mplayer, you can play the .iso like this:

mplayer dvd:// -dvd-device mydvd.iso

Otherwise, you can mount the ISO to a mount point and play the DVD as if it were mounted from disc.

sudo mkdir -p /mnt/iso
sudo mount -o loop mydvd.iso /mnt/iso

I use totem or vlc and I can open this dvd by doing:

totem dvd:///mnt/iso
vlc dvd:///mnt/iso

To burn the ISO to a DVD:

sudo growisofs -dvd-compat -Z /dev/dvd1=mydvd.iso

You might need to change /dev/dvd1 to /dev/cdrom1 or /dev/dvd, depending on your system. Or

Tags: 

Things Your New Baby Does Not Need

  • A Mobile: This one was totally not obvious to me at first. I thought all kids loved mobiles. What I had not realized, however, was that 99.9% of the time, my baby would not be in her crib and awake in a well-lit room.
  • Projection mobile: see above.
  • A mirror that attaches to her crib. Another one I totally missed the ball on. I thought my daughter would love to gaze in the mirror, maybe before going to sleep. It doesn't happen. You'll either be putting your kid in his crib asleep, or you'll be putting your kid in his crib awake, in which case the last thing you want them to be doing is grabbing a a mirror and all the little toys that are dangling off of it.
  • Humidifer: What is the point of these? Do they actually work? We ended up getting a "cool mist humidifier" when she was really sick with a bad cough. I'm still not sure if it works and apparently there is no evidence that it does. The best thing for a cough we have found is to take her outside. My guess is that it is something to do with the temperature of the outside air. Or it could be that being upright helps. Anyways, I'm not convinced that a humidifier is necessary.
  • High-chair with recline position: Seriously? The advertisement for one of these basically said that it was a great idea because when your kid is done eating and she is tired, you can just lower the seat back and they can go to sleep.
  • Stokke crib: We fell for this. It looks pretty in the store but when you see how much oval betting costs you'll think twice about buying this. What you also don't need is the Stokke Mini bassinette mode. What's the point of a smaller crib? Besides giving me a few hours of work taking it apart and converting it to the normal-sized crib. One advantage of this crib is that it actually lasts a long time. If you take off the side when they start climbing out, they can use it as a toddler bed. I'm guessing for most kids, this means you can use it from age 0 to at least 4 or 5 depending on how tall they are.
Tags: 

The Worst (or Best) Rod Black Quotes from the 2010 Olympics in Vancouver

Watching the short-track speed skating and figure skating at the Winter Olympics in Vancouver I was reminded of the sheer awesomeness that is Rod Black. Some love him, others want to strangle him (or maybe just hit the mute button). Throughout the Olympics I jotted down some of the most puke-worthy and groan-worthy things Rod Black said. Then I went to CTV's website and uncovered a few more gems. I'll leave the delivery up to you. Make sure to use lots of long pauses and think of Rod and his glorious mustache (which he unfortunately shaved off). Rod Black, if you see this, I hope you have a sense of humour!

Rod Black 2010 Olympics Quote
Puke-ometer
"Celebrate Ilderton. Celebrate Moirs. Celebrate Virtues. Celebrate Canada."
Puke
"Flawless. If there was a slip in their program, it was nary a slip."
Puke
"They just happen to be the best ice dancers on the planet."
Puke
"The Americans were perfect. The Canadians were perfect."
Puke
"We CAN believe!"
Puke
"Ohhhhhhhh Canada. Dream ride, golden quest. They've skated together since they've been kids. They are 4 minutes away from the ultimate goal."
Puke
"Is it enough!? Magic!!! 11,000 in here think so."
Puke
Marilyn: "It was an exquisite performance. Exquisite." Rod Black: "It melted this ice. It brought the crowd to its feet, and the house down."
Puke
"The theme has been 'believe.' Do you believe? <Virtue and Moir score announced> Yes!!!"
Puke
[Virtue and Moir] Friends, Virtue-aly forever. Born to skate together."
Puke
"We've got a couple of Americans, a couple of Koreans, and a couple of Hamelins"
Puke
"4 skaters. 5 laps. 3 medals. 2 Canadians. 1 Gold."
Puke
"The brothers Hamelin."
Puke
"You CAN believe Charles Hamelin, you CAN!"
Puke
"It is — Charles Hamelin. It is — Francois Louis Tremblay. It is — Canada. Gold and Bronze, here TO-night!"
Puke
"Pure. Canadian. Gold!"
Puke
"China, to the fore!"
Puke
"The golden boy, Charles Hamelin."
Puke
Absolute Gold here tonight!
Puke
And the brothers Hamelin are going to be on a podium together — their dream — here in Vancouver.
Puke
The Canadian men had been shut out. Couldn't crack the podium. They were saving the best — for last.
Puke

Idea for puke-ometer shamelessly stolen from the Christie Blatchford Hall of Shame

Tags: 

NoMachine NX is awesome

Short-version:
Use NX. VNC sucks.

I love Remote Desktop for connecting to Windows machines remotely. I worked from home many times while at Kodak and if it weren't for Remote Desktop, it would have been impossible to enjoy a full-screen connection to my work desktop while at home. I didn't think there was anything for Linux besides VNC until now (I had used remote X a long time ago though, to connect to the Solaris machines at UBC). Then I discovered NoMachine NX (NoMachine is the company's name and NX is the product name). I downloaded the Free Edition for Linux and then grabbed the Windows Client (which apparently is also free?). It's ridiculously fast, as fast as Remote Desktop. Google is also working on neatx an open-source NX server implementation and there is the freenx project, a GPL-licensed implementation of the server and client components. If you are trying to connect to a Linux desktop remotely, don't even think about using any of the VNC derivatives. Use NX.

Tags: 

Dell External Wi-Fi Switch

So the other day the WiFi stopped working on my Dell Inspiron 1720 laptop so after a little bit of troubleshooting and assumed the mini-PCI express wireless card was fried and ordered a new one from Dell's website. The new one didn't work either. Then I suddenly remembered that there was some sort of WiFi switch on the side of the laptop. I felt the switch and moved it moved it in the direction of "On" and it clicked! So it had been turned off! We move our laptop around a lot and somehow the switch had been switched to the off position accidentally.

I'm still glad I ordered the wireless card though, as it is a Wireless-N card so now if I upgrade my router to a Wireless-N router I might get faster speeds!
[img_assist|nid=373|title=Dell External WI-FI switch|desc=Mine looks something like this, but not exactly.|link=node|align=left|width=373|height=271]

Tags: 

Windows and 64-bit

Doing development, or more specifically deployment in a Windows 64-bit environment can be a frustrating experience. Let's start with a simple example from MSDN about the File System Redirector:

The %windir%\System32 directory is reserved for 64-bit applications . . . Whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to a new directory, %windir%\SysWOW64

That's right, the System32 folder is used by 64-bit applications and the SysWOW64 folder is used for 32-bit applications. It's so obvious.

8 Things That Piss Me Off About Windows on a Daily Basis

  1. The fact that notepad.exe is still shipped with the product. I don't use notepad. I use gvim. But everytime I log on to a customer's machine or log on to another machine at work what editors are installed? None. Just Wordpad and Notepad. If I'm lucky, Notepad++ or something like that might be installed.
  2. When I copy something to my clipboard from the cmd.exe command line I can't copy and paste across multiple-lines in a nice wrap-around fashion. It only supports a "column mode" style highlighting.
  3. The cmd.exe window is fixed width and can't be widened by clicking and dragging the corners of the window, except by going to the windows's properties and making it wider.
  4. No nice equivalents for *Nix tools like find, grep, du, rsync, locate, etc... I could go on forever here.
  5. Symlinks and hardlinks are possible but totally unsupported by the rest of the OS. Technically NTFS supports symlinks and hardlinks but it is virtually undocumented. There are some third-party tools that can create and manage symlinks. As far as I know there is no way to create a symlink or hardlink from Microsoft's default File Explorer, Windows Explorer, or from the command line, although there is an "ln" utility available online. I did create one in Vista once, using junction.exe.
  6. I have to run bloated virus-scanners. Currently at work we have McAfee which takes up 100M of RAM and who knows how many CPU cycles.
  7. Lagging 64-bit support. The standard developer boxes we used at my last company were nice powerful Dell workstations with 2GB of RAM and Windows XP. Most of us upgrade to 4GB but only 3.3GB of RAM is available to the OS. This get used up quickly when you're running VMWare, Visual Studio, Firefox, Outlook, P4V Perforce client, and a Desktop Search application. I'd blame my former employer more than Microsoft for this. IT should be supporting Windows XP 64-bit by now, but the fact that Microsoft didn't release it until 2005 means that many companies still have yet to adopt it, and most are probably now thinking of skipping Windows XP 64-bit and going straight to Vista.
  8. No package management. I have to go to a website to download an application. Some applications have their own updater tools. Microsoft Windows has it's own updater tool, but otherwise, installing and removing software in Windows is much 10x more of a pain in Windows than it is in Linux.
Tags: 

Concatenate/Combine PDF Files in Linux

I know there are lots of ways to do this. This is not a HOW-TO, but just sharing a script I made for doing this. It's a decent example of how to write a command-line utility in Python.

Since I write my cover letters and resumes in LaTeX I always need to concatenate the two together before sending it to an employer. This is very important so that the person on the other end prints out both and it makes their life easier by not having to worry about two files. For the longest time I just had a simple script that looked like this:

#!/bin/sh
Tags: 
Topic: 

Vancouver Sun Parking Tickets Website Screen Scraper

[img_assist|nid=367|title=|desc=|link=none|align=right|width=150|height=146]
When the Vancouver Sun came out with their Vancouver parking tickets database I immediately had some burning questions, like, did the meter maids work on holidays? Do the work less in the evening than during the day? I found it difficult to answer these questions using their interface, so I decided to screen scrape all 1.6 million parking tickets in to my own MySQL database. This was a bit challenging as they made it difficult to screen scrape the data but eventually it could be done simply by first getting an AppKey, a hidden value inside the HTML source and then doing queries using that AppKey as a parameter. It took about a week to get all 1.6 million tickets downloaded. By using Django, it was easy to get them in to a database and view the results. Initially I just put all the data in to one table, then later I decided to normalize the data a bit which was interesting as I decided to do that in pure SQL which I hadn't done before. I did the scraping itself using a combination of BeautifulSoup, lxml, and mechanize.

vancouver-parking-tickets project at GitHub

MySQL SQL dump (42 MB)

Here's some data:

Topic: 

Vancouver Park Board Swimming Lessons Screen Scraper

I was waiting for the January 2010 swimming times to appear on the Vancouver Park Board website but I got tired of all the clicking and scrolling required to see when the lessons were available. The other problem was that once the lessons appeared for one pool, some of the other pools still hadn't posted their lesson schedule for January 2010. The times that came out for the first pool were not ideal so I wanted to wait and see what came out for the other pool, while making sure that the first pool didn't book up.

Topic: 

Django Recipes Application

[img_assist|nid=362|title=Django Recipes Screenshot|desc=|link=popup|align=right|width=98|height=100]

My mom was writing a family cookbook using Microsoft Word and I thought this was a bad idea for several reasons. At first I thought about using LaTeX to separate the style from the content a bit, then I thought about using XML, then I settled on a database as being the most generic to store recipe data. I quickly decided on using Django to create this cookbook framework because Python is probably my strongest language and it makes creating custom websites really easy.

Topic: 

Ticketmaster fees

[img_assist|nid=353|title=|desc=|link=none|align=left|width=316|height=262]
Just bought some tickets on Ticketmaster and couldn't believe all the little fees that they add on. Why can't they just bundle these charges in to the ticket price? The "order processing fee", although it is added on to the "order" not the ticket, could also be bundled in to their overall costs. Make it a fixed cost per ticket rather than a cost per order. The "order processing fee" was especially annoying because when I was asked to select how I wanted my tickets (standard mail, express mail, pick-up, etc...) I chose standard mail because it said "Free." What is the "convenience charge" anyways? Just put everything together in to one fee and tell what it is up front. Break-it down later if you want.

Open Windows Explorer (explorer.exe) in a different folder, not in Documents folder

I use 32-bit explorer in 64-bit Vista because of a few problems that use 32-bit explorer extensions and therefore don't work in the default 64-bit explorer. So I call the explorer.exe in the SysWOW64 directory (confusingly, the apps in the SysWOW64 directory are 32-bit apps).

%systemroot%\SysWOW64\explorer.exe /separate /n,/select,%HOME%

%HOME% doesn't seem to exist prior to Vista/2008. Just replace that with whatever directory you want explorer.exe to start in. Of course if you're not using 32-bit explorer on a 64-bit system or if you are on a 32-bit system, you need something like:

%systemroot\explorer.exe /separate /n,/select,%HOME%

I also use this shortcut to launch the 64-bit Explorer (there are a few explorer extensions on my machine that are 64-bit only!)

Tags: 

Pages

Subscribe to David Grant RSS