Using cURL to download a file

Hey Peter, it’s Peter. Just a quick reminder for when you forget the next time.

To download a file using cURL you can use either:

curl -O http://code.jquery.com/jquery-1.4.3.js

Which’ll download the file in question and store it with the same name as on the server. Or you can use

curl -o yourCleverNameHere.please http://code.jquery.com/jquery-1.4.3.js

Now you won’t need to look this up here next time.

Kind regards.

Yourself

JavaScript closures

I like JavaScript! There, I said it!

I work in a JavaScript hostile environment where people want to do everything in pure Java, which is why I spend most of my time trying to get JSF and a Portal server to play together nicely (sad story!). But! Deep down I long for a simpler life, a life consisting of HTML, CSS and pure JavaScript and nothing else (well maybe a bit of PHP on the server).

So why do I like JavaScript? I like it because it’s so dynamic. Need a method on an object? Just add it when you need it. You can bend the rules and pretty much do as you please. More than once has JavaScript saved our arse when normal server side programming has failed. And then there’s the more “hard to grasp when you’re used to Java” features. Things like that a function can return a function, callback functions, scope of variables and closures.

Especially closures I’ve had quite a few attempts at trying to understand. I’ve been attending a JavaScript course recently which was very interesting and fun. Of course we were discussing closures and this time I think it finally clicked. Therefore, to remember, I’ll write this post, so that I can re-read it in six months when I’ve forgotten about closures again.

Continue reading JavaScript closures

Introducing: Local Birds

Everybody else is doing it, so why not me? …What the hell are you talking about? HTML 5 of course!

HTML5 is everywhere right now so I thought I’d have look at some of the new features as well. Therefore I’ve been playing around with the Geolocation API and the Twitter API. And the result can be found here:

https://peterbodskov.dk/sandbox/localbirds
Continue reading Introducing: Local Birds

Creating iso file from VIDEO_TS folder

Long story short.

Entire family…vacation…went on tour…bought DVD on tour…stupid Peter promised to make copies to everyone…error on DVD…copyied files (sans corrupt one of course) to Mac…now have VIDEO_TS folder on Mac…tries to burn to DVD…fails…swears…tries again…fails again…curses…tries again…fails yet again…goes to Google…finds solution.
Continue reading Creating iso file from VIDEO_TS folder