Gnafu
How do I download a file? (win vs linux)

Problem:
I need to download many files like these

http://www.site.com/page.php?id=101
http://www.site.com/page.php?id=102
http://www.site.com/page.php?id=103

the page is the same, the content is dinamic, depending on the id passed.

I don’t want to download any unnecessary software to do a simple task like this, so I search a little…

Preparation:

I wrote all the links in a text file, one per line. (A list is always usefull)
Let’s say the file is filelist.txt

Solution for Windows 7:

I can use the built-in Powershell !!
There is the link in Start->All Programs->Accessories->Windows Powershell->Windows Powershell
Btw
, I managed to reach the powershell guessing I had to type “powershell” in the console.

First I need to import the module for the Background Intelligent Transfer Service (BITS) with:

PS C:> Import-Module bitstransfer

Then I must provide the list of files formatted as this:

Source, Destination
http://www.url.of/your/source.file, c:\path\where\to\save\my_file_with.extension
http://www.url.of/your/source2.file, c:\path\where\to\save\other_file.extension

(Remember that “Source, Destination” is the actual first line of filelist.txt)

Once I have the file formatted correctly I can use

PS C:> Import-CSV filelist.txt | Start-BitsTransfer

to read the input file and download all the file.. Good!


NOT GOOD! Bits doesn’t support dynamic content!

BITS supports HTTP and HTTPS downloads and uploads and requires that the server supports the HTTP/1.1 protocol. For downloads, the HTTP server’s Head method must return the file size and its Get method must support the Content-Range and Content-Length headers. As a result, BITS only transfers static file content and generates an error if you try to transfer dynamic content, unless the ASP, ISAPI, or CGI script supports the Content-Range and Content-Length headers.

I couldn’t download the files with a batch, I just made an html file with many links pointing to the URLs and downloaded by hand (Save link as..).

Solution for Linux:

Open a console
Type “wget -i filelist.txt”

Anything to say?

Shaver

Today’s fix: Braun 3773
It’s an electric shaver with internal battery.

The battery, a good Ni-Mh AA, avoid the need for the deadweight as used to be in the previous model and it last very long.

The problem is a broken clip that should hang the head, so I need to keep it in place with a finger while shaving.

The good clipThe broken clip

You can see the broken clip doesn’t come out in the “lock” position (right photo).

Here’s how i fixed it:

1 - I took the head off

2 - Unscrew the 3 screws: 2 under the head, 1 at the bottom

3 - I forgot to unhook the rubber protection between the two sides of the shaver, here how to do it correctly.

Do it at home

Here’s the broken pin. The spring cannot work.

There is some space for the clip to go back when it’s pushed, that’s where I put some filler to keep it hooking the head.

4 - I cut a foam peanut for the filler (it’s not a peanut, it’s a cube, but you get the idea)

5 - A little glue to keep it in place.

6 - Here we go! I’m going to shave now!

Before/After:

Let’s make some space.

We have an old electric car circuit model hanging around in our porch and it’s packed in a polystyrene box.
The plastic is wearing off every time we touch it so I decided to give the toy a new house, a cardboard one.

Smaller pack, easier to hide, less noticeable.

Btw, I recycled the plastic box :)

Needed:
- Cardboard bottle spacer soon-to-be-trashed
- Scissors
Isn’t meant to be great, just functional.

Needed:

- Cardboard bottle spacer soon-to-be-trashed

- Scissors

Isn’t meant to be great, just functional.

Tumblr with Feacebook enabled

I like it.

Fiat Punto ‘94

The direction-lights dashboard light was off (blown bulb), luckily there were an unused bulb inside the dashboard.

Yay! My blog

Too much hassle installing wordpress on my altervista site, here I am on Tumblr!