Archive for the ‘Random Junk’ Category

Automated webcam capture/image downloader

Wednesday, January 2nd, 2008

The other day I was checking out a webcam at a local ski resort, and wanted to see what an entire day’s worth of shots looked like played in a movie. I’m sure there are apps out there that do this sort of thing, and might even be an easier way of doing this. Regardless, I decided to have a play.

Below is a simple VB Script file (sorry windowless folks) that will download and save an image to your hard drive. It will save the images in the same directory the script is running.

Dim imageURL
imageURL = "http://www.mtbachelor.com/@@/cams/wvskycam.jpg"
Function SaveBinaryData(FileName, ByteArray)
	Const adTypeBinary = 1
	Const adSaveCreateOverWrite = 2
	Dim BinaryStream
	Set BinaryStream = CreateObject("ADODB.Stream")
	BinaryStream.Type = adTypeBinary
	BinaryStream.Open
	BinaryStream.Write ByteArray
	BinaryStream.SaveToFile FileName, adSaveCreateOverWrite
End Function
Function BinaryGetURL(URL)
	Dim Http
	Set Http = CreateObject("WinHttp.WinHttpRequest.5.1")
	Http.Open "GET", URL, False
	Http.Send
	BinaryGetURL = Http.ResponseBody
End Function
Function doSave()
	Dim image, fName, p_month, p_day, p_hour, p_minute, p_second
	image = BinaryGetURL(imageURL)
	p_month = padZero(Month(Now))
	p_day = padZero(Day(Now))
	p_hour = padZero(Hour(Now))
	p_minute = padZero(Minute(Now))
	p_second = padZero(Second(Now))
	fName = p_month & "_" & p_day & "_" & Year(Now) & "-" & p_hour & "_" & p_minute & "_" & p_second & ".jpg"
	SaveBinaryData fName,image
End Function
Function padZero(val)
	If(Len(val) < 2) Then
		val = "0" & val
	End If
	padZero = val
End Function
doSave()

Copy and paste the above script into an empty text file. Go find a webcam you’d like to capture. When viewing the webcam image, right click and copy the images URL. Change the imageURL variable at the top of the script. Save the script (.vbs extension). Next you’ll need to set up an automated task to run the script. For help on how to set up tasks, check out this KB article. You’ll want to schedule it run somewhat frequently, but no more frequent than the webcam updates.

That’s pretty much all you need to do. If everything goes right, image files should start appearing in the directory that the script is located.

To create a movie from the sequence, you’ll need to find some software to do that. Out of sheer laziness, I just use QuickTime Pro, but there’s a bunch of shareware/freeware options available out there.

Have fun…

Microsoft Surface Parody

Tuesday, September 25th, 2007

One day, your computer will be a big-ass table…

The most annoying behavior : Backspace = Back Button

Tuesday, September 25th, 2007

This has got to be one of the WORST ever behaviors for a user interface. Who ever thought of this one, should be shot.

There is nothing worse than when you’re entering data in a form and hit backspace only to have your browser react as if you clicked the back button.

Arghhh.

Julien Dupont

Thursday, September 20th, 2007

I don’t want a pickle
Just want to ride on my motorsickle
And I don’t want a tickle
‘Cause I’d rather ride on my motorsickle
And I don’t want to die
Just want to ride on my motorcy…cle

Thank you Arlo…

Heavy Metal Umlaut - The Diacritical Mark of the Beast

Tuesday, September 11th, 2007

motorhead logo

While trying to find some information on umlauts and the German language, I came across this and about pissed myself: The Heavy mMetal Umlaut

Moan my IP

Friday, August 24th, 2007

Forget ipchicken.com. I’d much rather use moanmyip.com.

Seam carving for content aware image resizing

Wednesday, August 22nd, 2007

Ariel Shamir and Shai Avidan have come up with a method for “retargeting” photos. An algorithm is used to detect horizontal and vertical seams of pixels with the least gradient magnitude. This path of pixels can then be removed from the photo, shrinking it in size, but preserving the rest of the photo. To increase the size of the photo, pixels are added along the determined seam.

You can view a higher resolution movie at Ariel Shamir web site. There is also a pdf available, however server speeds prevented me from actually downloading it.

Hip hop meets the violin

Friday, August 10th, 2007

Paul Dateh and inka one, layin’ it down. You can find their myspace pages here and here

Tsukuba - nonsense instruments

Thursday, August 9th, 2007

Breakin’ - Turbo’s Broom-Dance

Wednesday, August 1st, 2007

That’s hot.

Neural Interface - Controlling objects

Saturday, July 28th, 2007

Pretty sick. The applications are endless!

Helping the handicap and assisting astronauts is cool and all, but what about as a TV remote? Just think, you’d never have to waste your precious energy pushing those remote control buttons any more. If the consequence of sloth is only a pit full of snakes, bring it on.

Habanero Pepper - It’s just food. What could go wrong?

Thursday, July 26th, 2007

That’s 200,000 - 300,000 scoville units of mouth burning fun!

Wicked Pissah Games

Tuesday, July 24th, 2007

Check out Bit-101’s new project Wiked Pissah Games. There’s only one game so far, but I expect good things to come.

Onslaught 2

Thursday, July 19th, 2007

This game is a total time suck! Prepare to get nothing done today :)

iPhone, Will it Blend?

Wednesday, July 11th, 2007

iPhone advertisement remix

Wednesday, July 11th, 2007

Great advertisement for wind energy

Tuesday, July 10th, 2007

Dan Deacon on NBC

Wednesday, July 4th, 2007

I think this guy is brilliant in his own “special” way.

Checkout more from Mr. Deacon, or visit his Web site.

That’s why they call it dope.

Monday, July 2nd, 2007

No Way. Yeah right…

Friday, June 8th, 2007