Matthew Garrett
Dear Mr Occupier
Thank you for your recent application for an online account with
www.house.co.uk. I am sorry for my delay in responding to your application
request received in October.
Received today. Thanks, British Gas.
Support our Aussie Farmers, dear Henry, dear Henry. Support our Aussie Farmers, dear Henry. Support!I hate "current affairs" shows. They're nothing but beat-ups and bullshit. But I had the unpleasant experience of actually watching an episode just now, and they've hit a new low. It was an article on prawn farmers, and oscillated between South Park style "they took our jobs!" and "those evil retailers, mislabelling foreign prawns as local". Now, I empathise with people who lose their jobs due to circumstances beyond their control, and misrepresentation is a fairly unpleasant thing, but the bit that thoroughly pissed me off was the return comment from the presenter: "We should all support our Aussie farmers." How, exactly? We can't "buy Australian", because the products are mislabelled, and that was the whole thrust of their article. No mention was made of legal action, civil or criminal, and the number of people watching who would be in a position to take such action would be vanishingly small. Misrepresentation is already illegal, so it isn't a matter of pressuring our elected representatives to pass appropriate legislation. At least I know I've not been missing anything by running away every time a show like this comes on the idiot box for the past 12 months.
Section "ServerFlags"
Option "DefaultServerLayout" "double"
#Option "DefaultServerLayout" "Default Layout"
EndSection
# This Device section is effectively identical to the one for the
# primary screen, with the addition of the Screen 1 parameter to
# select the alternate display device.
Section "Device"
Identifier "vgaout"
Driver "i810"
BusID "PCI:0:2:0"
Option "MonitorLayout" "CRT"
Screen 1
Option "DDC" "false"
EndSection
# external display
Section "Monitor"
Identifier "generic"
# I kept all these loose because most monitors support
# autodetection.
HorizSync 27 - 96
VertRefresh 50 - 110
Option "DPMS"
EndSection
Section "Screen"
Identifier "external"
Device "vgaout"
Monitor "generic"
DefaultDepth 24
SubSection "Display"
Depth 24
# I'd have added many more modes here, but
# the amazingly crufty external LCD I'm using
# only supports 1024x768.
Modes "1024x768"
EndSubSection
EndSection
# xinerama layout
Section "ServerLayout"
Identifier "double"
# The 0 0 (I think) identifies this as the "root" monitor
Screen "Default Screen" 0 0
# You can also use Below, LeftOf, or RightOf to position
# your shiny subscreen
Screen "external" Above "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
# Never, ever forget this option. You'll get laughed at
Option "Xinerama" "true"
EndSection
pub 1024D/59B2D9A0 2005-02-03
Key fingerprint = 6583 A11F 1428 FCDD 65FC C7B5 E0CD 3CDC 59B2 D9A0
uid Matthew G L Brown (Default Key)
uid Matt Brown (Debian Packages)
uid Matt Brown (WLUG Key)
uid Matt Brown (CRCnet Key)
uid [jpeg image of size 4390]
uid Matt Brown (MediaLab Key)
sub 1024g/DF8A0504 2005-02-03
sub 1024D/4054AB08 2006-01-04 [expires: 2008-01-04]
For each File lets you run an arbitrary set of GNU BASH commands upon an arbitrary set of objects. It can be used to perform repetitive tasks such as renaming, extracting, moving, and manipulating a large number of files.Yes, dear friends, someone has sat down and written a program (and associated manual) to implement a bash for loop (and possibly a bit of find as well). Since it's all written in bash, it's not as though the author of the program was incapable of working out how to write for i in /path/*; do [...]; done, either. I'm not quite sure which part amused me the most. Was it the ever-optimistic -devel and -user mailing lists, completely devoid of archived material? How about the user manual -- 40% of which was the licence text? Perhaps it was the fact that this not just a bash for loop -- it's a fully internationalizationable bash for loop. I know one thing, though -- with all of the energy put into this program (and it's been going for several years now, apparently) the author could have created the ultimate, never to be surpassed manual for the bash for keyword, which would have been significantly more flexible, and certainly less interesting to poke fun at. Addendum: the whole site that FeF is hosted on is accessable only via SSL with a self-signed certificate -- except for the download page, which is HTTP only. So you "know" that the non-existent list archives are really what they say they are (at least as long as you trust "Gna!" as a certificate authority, as I'm sure we all do), but the actual source code is hosted who-knows-where, with no useful assurances as to provenance whatsoever.
[ 7 ] Choice 1: Jonathan Walther
[ 1 ] Choice 2: Matthew Garrett
[ 1 ] Choice 3: Branden Robinson
[ 5 ] Choice 4: Anthony Towns
[ 3 ] Choice 5: Angus Lees
[ 2 ] Choice 6: Andreas Schuldei
[ 6 ] Choice 7: None Of The Above
I haven’t been doing too much Debian work lately, but I think I’ll be uploading discover1-data and abiword soon. I will have to find a big chunk of time if I hope to do any kernel or d-i work.
STDIN.readlines.sort_by rand .each line puts lineBut this is slow, as sort_by needs to be at least O(n lg n), and probably not perfectly random (I suppose you could do rand <=> 0.5, but that s not perfect either). What to do? We can implement a proper Fisher-Yates shuffle in a function, but that takes a couple lines. Can we still perform the actual read-and-print in one? Yesterday, why wrote something that really made me stop and go wow . We can attack the random sort problem in a similar (if more boring, as there are no lambdas to pass in) way, by simply adding another method to Array:
class Array
def swap!(a, b)
self[a], self[b] = self[b], self[a]
self
end
def shuffle!
each_index do i
j = i + rand(length - i)
swap!(i, j)
end
self
end
end
STDIN.readlines.shuffle!.each line puts line
Now that is cool.
transcode -x mplayer -i $FILE.wmv -g 640x480 -e 44100,16,2 -o $FILE.tc --export_prof dvd-palItems of note:
mplex -f 9 -o $FILE.vob $FILE.tc.m2v $FILE.tc.mpaThis is a simple "glue them together" command -- the only interesting bit is -f 9, which simply specifies a particular MPEG-2 multiplexing method (full DVD-compatibility, or some such). If things aren't working out for you, try -f 8, which I believe also works. Since you'll probably have a bunch of video files to convert at once, you'll want to automate all of this with a shell script or shell 'for' loop. Step 2: Make a DVD Layout Packages used: qdvdauthor 0.0.10-0.1 This is the bit that I thought would be hard, but is actually amazingly easy (the previous step took me two days to get completely right, this bit took me about an hour). Fire up qdvdauthor, answer any stupid questions it might come up with. When the main screen comes up, click on the 'Add Movie' button on the left hand side, then select the first video you want to add. Repeat as required to add all of the videos you want. (Remember to add the VOB files you created earlier, and not the WMVs you might still have laying around. D'oh!) Clicking on the 'Video' tab on the left hand side should list all of your videos. Check they're all there, and are the correct size. Next, create or find a suitable background picture or video to make your main menu background. I've only tried with an image, but it seems to accept videos if you give them to it. Click on the 'Add Background' button on the main qdvdauthor screen. Pick your image. The image will probably need resizing; just go with the flow and pick the correct image size. Now you need to add those funky little menu items for selecting on. This is the really cool bit. Right-click on the background image you've got, and select 'Add Text'. Drag on the background to create a text box. You'll get a dialog come up, type some text in the bottom box, then click 'OK'. This'll create the text on the background. Drag it around if you need to. Finally, right-click the text and select 'Define as Button'. Another dialog box will appear. Rename the button if you like, then pick which video you want to play from the select box marked 'vmgm'. Click 'OK'. Repeat as necessary. That's all the hard stuff done. You can add a sound clip to play over and over again if you like, but I haven't done that yet, so you're on your own there. Step 3: Make the DVD For this step, I needed to compile toolame from source. Get it from http://toolame.sf.net/. This is super-simple. Basically, just click on the giant icon labelled 'DVD' in the top toolbar. Follow the prompts. Click 'OK' as necessary. When the process is done, check the 'Keep Open' checkbox quickly, and go over the output to ensure nothing completely crapped out. Assuming all is well, you can make your DVD image by running:
mkisofs -dvd-video -udf -o /tmp/dvdimage.iso $DVD_DIRNaturally, replacing /tmp/dvdimage.iso and $DVD_DIR with appropriate values. Lastly, cook the ISO to appropriate media with something like:
cdrecord -dao -eject -v speed=2 dev=1,0,0 /tmp/dvdimage.isoAssuming all went according to plan, you should have a physical DVD you can stick in your DVD player and watch to your heart's content. Congratulations! You just did all of this in about a 50th of the time it took me.
Next.