Thursday, March 25, 2010

Download trailers from iTunes

I just don't want to visit http://trailers.apple.com every time I want to know about new movies, instead I would like to automagically have those files downloaded to a directory. I created a small script for this purpose.

First, visit the link above (just to learn your way around Apple's trailer site) select a movie and and choose a resolution. You usually have 3 HD options on a movies' trailer page: 480p, 720p and 1080p.
Right-click on the specific Resolution button and select Copy Location.

With the movies' URL copied and pasted, here's is an example for the movie "Wild Grass":

$ wget -U "QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)" --referer=http://trailers.apple.com/movies/sony/wildgrass/ http://trailers.apple.com/movies/sony/wildgrass/wildgrass-tlr1_h720p.mov


No magic here except the User-Agent string. If you don't provide the proper user agent (means: lying that we are a Quicktime player), you won't get the movie file but only an .html file. The referrer is just here for the safety's sake, omitting it won't cause any problem.

Saturday, February 13, 2010

How to speed up a GNOME panel's autohide animation

The whole thing started when I installed Cairo-Dock but wanted to keep my top GNOME panel for a few exotic settings like starting VPN (or for those things I can do blindfolded). I set the panel to Autohide, but the speed it appeared and disappeared was very slow, and I wanted to change it.
There are lot of good advice on the net, but all of them was based on using gconf-editor. Turned out, gconf-editor sucks.

Okay, it is still beta or what, but it simply fails to load all .xml files up from ~/.gconf parent dir, which I don't feel as a technological challenge.

If you ever happened to delete/create/delete-again/create-again a few GNOME panels, and now you have only 1 panel on your desktop, the only thing uncertain, is its name.
Mine is "bottom_panel_screen0", and it is not in gconf-editor's list. To find it easily (meaning "few typing, less thinking") I set my panel's height to a crazy 149 pixel and did a full search on the ~/.gconf directory with some help from 'grep'. BUT, if you are to issue this command, wait about a minute or drink a coffee after setting that 149 in the panel properties. It needs 'bout a freakin' minute to get this data written back to file.

$ find ~/.gconf -name "*.xml" -exec grep 149 {} \;

Now you have the file, you can modify those values inside it. You may find that there are no values associated to certain parameters like 'unhide_delay', 'hide_delay'. Those parameters are set as default elsewhere, but you can still override them here.
You could edit the .xml file itself with your preferred text editor, but gconftool-2 seemed to be the nice way of modifying parameters.

4 parameters that matter:

enable_animations

If you set it to 'false' the panel will pop up in a fraction of a second. When it is true, the panel will appear animated. I like it set to false.

$ gconftool-2 --set /apps/panel/toplevels/bottom_panel_screen0/enable_animations --type bool "1"


animation_speed

Defines the speed of animations, if that is turned on. Possible values are: fast, medium, slow. If you set the parameter to some gibberish, the last settings stays active. If you have a slow video card, speed may seem sluggish.

$ gconftool-2 --set /apps/panel/toplevels/bottom_panel_screen0/animation_speed --type string "fast"


unhide_delay

If you placed your mouse cursor where the panel should appear, this is the amount of milliseconds the system waits before the panel pops up. This works even with disabled animation. I suggest to keep it high to avoid unwanted popups if your mouse cursor wanders to the activation area.

$ gconftool-2 --set /apps/panel/toplevels/bottom_panel_screen0/unhide_delay --type int 1000


hide_delay

If you moved your mouse cursor away from the panel, this is the amount of milliseconds the system waits before the panel disappears. This works even with disabled animation. I suggest to keep it low to make the panel disappear as fast as possible.

$ gconftool-2 --set /apps/panel/toplevels/bottom_panel_screen0/hide_delay --type int 200

Thursday, November 12, 2009

VirtualBox 3.0.10. Guest Additions ISO is corrupt on Windows XP

I have upgraded to VirtualBox 3.0.10. and after installing a fresh Ubuntu 9.10 I was obviously trying to install the Guest Additions. Everything seemed fine, although there was a bit few files on the CD-ROM, and there was an OS2 folder (huhh?)
It turned out that no usable files are on the CD, dunno what messed that up.

The solution is to unmount the CD-ROM by the VirtualBox menu, then delete the VBoxGuestAdditions.iso file in the Virtualbox folder, so VirtualBox won't find it.
Next, try to install Guest Additions again and VBOX will warn you that the file is missing and offers you a download option.
Choose it, wait a little, and voila, you are done.

Sunday, September 13, 2009

Mindenki másképp csinálja

Már nem igazán emlékszem, hogyan keveredtem ide a Google Maps-en. Iowa államból indultam és aztán csak csak balra scrolloztam kb. 5 percig, mire rájöttem, hogy azok a nagyon sűrű, halvány és vékony függőleges/vízszintes vonalak azok utak. Gyakorlatilag ahol nincs valami nagyobb terepakadály, tó vagy hegy, ott keményen dolgozott a vonalzó: Aztán beúszott ez az érdekes minta, Vasarely is megirigyelhetné: Ezek itt bizony megművelt földek, és ha a Google mércének lehet hinni, akkor egyenként 64 hektár méretű mind, az utak itt is szépen, négyzetrácsosan haladnak a földek mellett. Nem tudom miért kör alakban művelik a földet - 200-300 km-re odébb már szép számmal akadnak "normálisan" megművelt földek is - a sarkok miatt elég nagy lesz a veszteség, úgy 22-25%.
Pozíció a Google Maps-en

Nikon marketing at its peek performance

Now that I have the Nikon D90 I decided I spent some hard earned dosh on a serious lens. Not serious enough for a pro, but better than the cheapest one in the range. That would be the Nikon 80-200mm f/2.8D ED.

I wanted to buy something faster than the 70-300 f/4.5-5.6 and I didn't need the professional 70-200mm f/2.8 AF-S VR...
I have just browsed about all camera shop websites, and in an hour or two it was only a matter of price. As it is a "good" habit of shops just listing the expensive lenses on their websites but not keeping a single one in shop, I wrote a mail, just checking if the 80-200mm is available. The reply was interesting: "Nikon just sends the price every time but never shipped this lens for a year now".
Uhh, ohh.

It is good that I have some Nikon website account, so I asked for some professional help. And the bad news came straight from the UK. This lens is discontinued in this region and I should check the 70-200mm f/2.8 AF-S because it is far more "superior".
As its price tag.

First: it is good to live in Central Europe, as every piece of hardware is about 30% more expensive than in the USA. Or 50%.

Second: If the average Joe wants to spend 1200-1700$ on a semi-pro lens between the 70-300mm for about 800$ (500$ the US) and the 70-200mm AF-S for 2500$ (1900$ in the US) chances are great that he/she will buy something good 3rd party lens instead. That would be the worst to happen to Nikon, the marketing guys must fill this hole soon.

Third: This lens is marked as "new" on Nikon's Japanese website.

Compiz - How to prevent Alt+Tab from instant switching in the background


When I have several application on my Ubuntu desktop, switching between them in Compiz with Alt+Tab has driven me nuts. In the instant I switched to another window, it got activated in the background. Because I'm too lazy to use Alt+Shift+Tab, instead of going backwards, I usually go around through the tasks. This causes a very annoying blinking screen which totally moves away my focus from the task manager area, not to mention a little slowdown.
Finally I gave it 10 minutes to find the solution.
  • In CompizConfig Settings Manager (System menu/Preferences/CompizConfig Settings Manager) look for Static Application Switcher (in Window Management section).
  • Click on it, and select the Appearance tab
  • roll down Selected Window Highlight
  • set Highlight mode to None
Done.

Móricz Zsigmond - Varga Laci, 4 éves, Budapest

"Úgy harap a szép karéj kenyérbe, mintha attól félne, hogy meg kell osztania valakivel. A gyerek mindig éhes, de ez a kisfiú úgy éhes, mint a felnőttek. Nem enni akar, hanem gyorsan belenyomni valamit a gyomrába. Tusfekete, ijesztő szeme, amely kese hajához képest valóságon túlzás, harapás közben akkorára nyílik, mint a szája és kiül rajta valami, amit felnőtt mát nem tud néven nevezni; csak egy szó illik rá, nem annyira értelme, inkább hangzása szerint: iszonyat. Szemével az evés védekező mozdulatait végzi: esdekelve néz körül, hogy ne bántsák. Az ételeket nem ízük, hanem nagyságuk és sűrűségük szerint különbözteti meg. A kenyeret nemcsak azért tartja, hogy le ne essék, hanem húzza is magafelé, hogy el ne szaladjon. Apja alkalmi munkás, ami hatósági fordítása a munkanélküli szónak. Öten: két szülő és három gyerek, összesen két ebédet és két adag tejet kaptak az ínségkonyháról. Egy fáskamrából átalakított széllelbélelt „lakásban” éltek. Még ezért is húsz pengőt kellett fizetniök havonta. Volt hónap, amikor az apa a felét se kereste meg. Kilakoltatták őket, három hétig tanyáztak egy üres telken a szabad ég alatt. A nehezen szerzett új lakásban egy elmulasztott házbért még elnéztek, de a másodiknál újra kitették őket. Késő ősz volt, a nyirkos hideg bebújt a gyerekek takarói alá, az eső arcukat csapdosta.

Laci meghűlt és meghalt."

Kálmán Kata fotója, 1931-ből.