Skip to content

Quick and dirty download proxy

fget is a small, quick and dirty download proxy in php and python, to be used on a webserver to allow it to download files to the webserver, and allow access to them.

Written for personal use when travelling, and on various bad links.
License? Buy me a beer next time you see me if it is useful.

[Digg] [Reddit] [Google] [StumbleUpon] Tagged ,

Bypassing liquid ban with help from KLM

I recently flew with KLM from Singapore to Amsterdam. They have this tradition of giving you small houses filled with jenever.

Thats just fine, but the problem is that they are filled with liquid, and above 100ml. So you have to have them in a sealed bag through security if you have a connecting flight.

KLM’s solution? Hand out a sealable bag, a card stating at which flight it was received, and date. The card was quite simple, with no serial numbers, no stamp, no signature. Just the flight numbers.

I got the bag and card after the house, and was told to seal it myself! I just ignored both, the house was quite ugly after all, and a bit of jenever is not worth carrying for me…

However, it is quite nice of KLM to hand out unsealed bags… Just another dent in the airport security?

[Digg] [Reddit] [Google] [StumbleUpon]

Android + webdav

Being a geek, the opportunity to upload pictures straight from my cell phone (Android) to the web is a nice feature. I could of course use Dropbox or a similar solution, but that is boring, and I don’t get to decide the URL…

So welcome WebDAV.

Finding a good webdav client for Android took me most of the time. I eventually settled for Cloud Browser (€.99), which was the first one to work as expected, and the only one I found which integrated neatly on the ‘Share’ menu of the gallery, making upload easy. There are several free apps as well, but the ones I tried did not integrate / behave the way I want.

The only drawback is that Cloud Browser uses Basic authentication, and not Digest. If you’re using public WLAN’s it might be a very good idea to use https to access your webdav repository like me.

For the Apache part of things I added a WebDAV configuration, more or less as detailed in the apache mod_dav documentation.

<Directory /home/vidarlo/websites/bitsex.net/dav>
 RewriteEngine off
 AllowOverride All
 Options FollowSymLinks +Indexes
 Order Deny,Allow
 Allow from All;
 Dav On
 AuthType Basic
 AuthName "WebDav"
 AuthDigestDomain /dav
 AuthDigestProvider file
 AuthUserFile /home/vidarlo/htpasswd
 require valid-user
 <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE GET HEAD>
 require valid-user
 </Limit>
</Directory>

This simply worked. I can upload pictures once I snap them, and I can sync files the other way too. Better than the dropbox for android, and I have control over my data… 🙂

Highly recommended system 🙂 If you’re lazy, you can always use the app mentioned with Amazon S3…

[Digg] [Reddit] [Google] [StumbleUpon]

Er postordrebestilling fra elkjøp ekstraservice?

Ja, meiner dinside.no:

Selvfølgelig skal du betale mer for å få tilsendt produktene til din egen postkasse eller nærmeste postkontor, i stedet for å hente det selv i varehus. Det er en ekstraservice det er rett og rimelig å betale for.

Er det sjølvfølge at det er ekstraservice? Nei. For Elkjøp sparer eit par kostnader.

  • Kostnaden ved Ã¥ leige eit lager er lÃ¥gare enn kostnaden ved Ã¥ leige et butikklokale
  • Lagerlokalet treng ikkje ha ørten tusen parkeringsplasser
  • Et lagerlokale kan betjene heile Noreg, i motsetning til ein butikk
  • Lagerlokalet treng ikkje samme grad av belysning og oppvarming som en butikk
  • Lagerlokalet treng antakeleg mindre betjening for Ã¥ hÃ¥ndtere samme salsvolum
  • Ingen treng bruke tid pÃ¥ Ã¥ plassere ut produkt i butikk
  • Turnover blir antakeleg større, og dermed mindre død kapital

Det er ikkje sikkert det er billegare for elkjøp, men eg vil anta at det er det. Og det er iallefall ikkje automatikk i at det er ekstraservice – tvert imot…

[Digg] [Reddit] [Google] [StumbleUpon]

I will not try OpenSuSE 11.3 for the next few weeks.

OpenSuSE 11.3 is out.

This will be the first release in quite a few years that I won’t try at the day of release. I’ve been using OpenSuSE since Pre-Novell (9.0 I believe), and have usually upgraded as soon as possible.

But why not this time?

Because the last three times I tried to upgrade, it was a mess for two days. The sturdy and solid SuSE is gone, and I’m left with a flaky OpenSuSE, which usually needs a few weeks to settle the most annoying bugs.

Preciously, SuSE was the one distro that you could be sure was working. But not anymore. They’ve simply got to many fuckups on the release day for me to thrust ’em.

I will upgrade. But not in a few weeks.

[Digg] [Reddit] [Google] [StumbleUpon] Tagged ,

CHDK on Ixus 100IS

CHDK is software for some Canon compact cameras, which allows somewhat more than the original firmware. Or rather – it’s a addon for the original firmware. Quite risk free.

On Ixus 100/SD780IS (can someone explain why canon insists on seperate names for EU and USA?), it is as of writing only a beta port – some flaws, such as the camera turning of in some conditions.

The manual for installing CHDK was not that great, with a lot of technical details missing in my opinion. Here’s what I did to get it working.

Manual load

To make the firmware update available in the menu, I had to put the camera into play mode (press the button to display pictures), enter the menu, set Lens retract to 0 mins. and restart the camera and go into play mode again. Pressing menu gave me the firmware update at the bottom. And it worked. But it’s quite slow way to ender chdk…

Automagic booting

For some reason, pressing ‘Make bootable’ in CHDK-menu did not work on this camera. I don’t know if it was because it’s a beta, or what the reason might be. I assume that you’ve already tested manual loading, so card is loaded with files…

Making the flash card bootable by hand was somewhat a hassle, as the procedure was not documented in the FAQ or Howto from CHDK. Except the mac guide for some reason.

It turns out that I had to edit the boot sector of the memory card. This is not for the faint of heart… Grab a copy of your boot sector with dd if=/dev/mmcblk0p1 of=bootsector bs=512 count=1. Replace mmcblk0p1 with whatever device the first partition of your memory card happends to be.

Open the file in your favourite hex editor (ghex2 or emacs for instance). Now, replace byte 64-72 (or 40-48 if you count in hexadecimal) with the value ‘bootdisk‘.

Write your modified boot sector back to the card with dd if=bootsector of=/dev/mmcblk0p1 bs=512 count=1, eject the card and flip the write protection switch. Power on your camera. Enjoy the glory.

My impression so far…

Ok, shooting in raw is quite nice. It means a chance to manipulate colour balance after the photo is taken. It gives a lot of possibilities originally out of range on a compact camera.

But the by far coolest thing is motion detection. The possibility of scripting, and controlling the camera with scripts is certainly nice 🙂

[Digg] [Reddit] [Google] [StumbleUpon]

Armin Bahrami rir White Wesir inn i solnedgangen…

White Wesir
Nyhetsspeilet gjer det igjen Рdei publiserer White Wesir sine hemmelige dokumenterv̴s. Og n̴r det blir p̴peikt hevder dei at dei var klar over at det var v̴s heile vegen.

Eller, Armin Bahrami p̴st̴r dei var klar over det. Resten av redaksjonen er ikkje like samstemte. Men uansett Рdet artige her er at mr. Fiskeslo har blitt opphavsmann til organisasjonen White Wesir, som jo er et klingande navn, med ei litt punkete sjakkbrikke som logo.

Det moynar kokte sammen var hÃ¥rreisande. Alle med gjennomført 2FY ville sjÃ¥ sprikande hull i det som sto der, og det var ogsÃ¥ intensjonen antar eg. Men Nyhetsspeilet har Ã¥penbart ikkje folk med grunnleggande kunnskap om naturvitenskap – eller sÃ¥ er dei redde for Ã¥ bruke kunnskapen.

Ikkje nÃ¥r folk pÃ¥peikte feila i materialet, eller nÃ¥r spøken vart avslørt, slutta Armin Bahrami Ã¥ tru pÃ¥ materialet. Han hevder fortsatt rapporten frÃ¥ White Wesir er ekte – til tross for at den faller pÃ¥ elementær fysikk.

Og no er altsÃ¥ Armin Bahrami pÃ¥ ferie. Kanskje greit Ã¥ fÃ¥ litt fred fra dei som pÃ¥peiker sÃ¥ drøye hull i vÃ¥set ditt at en uten problem kan fly en 747 gjennom dei hulla? Eller kanskje du skulle prøve Ã¥ gjere det du oppfordrer andre til – studere bevisa, skaffe deg fagkunnskap og vurdere kva som heng pÃ¥ greip og ikkje? For Ã¥ flytte vatn med greip er ikkje lett, Armin.

[Digg] [Reddit] [Google] [StumbleUpon] Tagged , ,

Stuck in a alternate reality…

Recently I’ve been working with PLC’s – which is so far from the computers I’m used to. As a GNU/Linux user I’m accustomed to having almost any tool available at the touch of my fingertips, and great amounts of knowledge in a instant.

But the PLC world? It’s a closed universe, with no protocol documentation (that I can find anyways), obscure parts that costs ten times more than I’d hope for them to. And all tools are in a walled garden – either you use Brand A, or Brand B. You don’t mix ’em. Once you’ve settled, and spent a couple of thousand dollars on programming software, you don’t change because the other is simpler.

And yet we’ve got standards for it: namely IEC 61131-3, which defines the languages. Yet, every make have their own peculiarities, and you can’t expect a project for Brand A to run on Brand B. At least not without rewriting large parts of it.

What a sad state of affairs, compared to the open world of GNU/Linux…

[Digg] [Reddit] [Google] [StumbleUpon]

Android og Nexus One

android-logo
Android på Nexus One. Fin, slank og lett telefon. Men det er ikkje det som er interessant. Det artige er filosofien bak slik den framstår:

Gi folk valgmuligheter! En kan bytte ut SMS-appen med to trykk Рvia Android Market. En kan bytte ut input-metode, og kort sagt: du kan bytte ut dei fleste komponenter uten ̴ m̴tte gjere ting manuelt. Det er berre ̴ finne den nye komponenten i market, og installere den.

Det er til gjengjeld veldig gjennomført. For Ã¥ velge ringetone fritt mÃ¥ du finne en app som kan la deg sette t.d. ein MP3 som ringetone – det ser ikkje ut som android kan gjere dette utan tillegg.

Det er vel omtrent stikk motsatt av det Apple har lagt seg på med iphone, og android følger jo på mange måter opp UNIX-filosofien: gjer en ting, og gjer den bra. Masse apps som har ett formål, og som funker bra til det formålet. Til gjengjeld har systemet minimalt med funksjoner i utgangspunktet.

I like it.

[Digg] [Reddit] [Google] [StumbleUpon] Tagged

They get tinier…

This is the memory device shown from both sides. Dimensions? 35mm long, 7mm deep, and 20mm wide at the widest point

This is the memory device shown from both sides. Dimensions? 35mm long, 7mm deep, and 20mm wide at the widest point

This is what it looks like when the (protective) soft rubber coating is off.  27mm long,  15mm wide and 5mm deep. Quite a reduction from last step.

This is what it looks like when the (protective) soft rubber coating is off. 27mm long, 15mm wide and 5mm deep. Quite a reduction from last step.

And finally - the reason it was broken: the electronics, and the memory chip. Yup, literally broken. And the dimensions of this thingie? 25.5mm long, 11mm wide and just short of 2mm thick

And finally - the reason it was broken: the electronics, and the memory chip. Yup, literally broken. And the dimensions of this thingie? 25.5mm long, 11mm wide and just short of 2mm thick


One of the things I’m wondering about is what the two golden contacts at the opposite end of the USB is for. It seems strange to place ’em there, but who knows?

In total, the active parts of this USB memory device 561mm3, and can contain 16GB of data. If we scale this up, we get 14260GB, or approx. 14TB of data per liter of volume. Using 3.5″ hard disk drives as the standard, they are approx. 100×143.75x25mm, or 359375mm3. The biggest 3.5″ today is 2TB or so, which means they measure in at approx. 5.5TB per liter of space – or less than half of the data densitity of flash drives…

Now, do the math with a Micro SD card, which can hold up to 16GB, and measure in at 15x11x1mm, or 165mm3 – or just short of 100TB per liter of space…

[Digg] [Reddit] [Google] [StumbleUpon]