Thursday, May 27, 2010

Panoramas

Turns out that creating quite impressive panoramas (or rather, impressive for a newbie like me) isn't hard at all! A camera that has panorama-assist feature or a tripod are useful, but they're not required. Once you have the pictures (better to take too many than too few), try Hugin (open-source panorama photo stitcher). Most of the times it does everything automatically, but sometimes you'll have to match points across pictures by hand. 

The problem with the resulting image will be the (sometimes large, depends on the photographer's skill :) areas with no data. Fortunately, there's a solution to that. It's a Gimp plugin that can recreate an area of the picture based on the surrounding pixels only. It it works great in this case. Sure, it's not always perfect and you can get the occasional floating mountain in the middle of the sky, but you can usually fix it quickly by doing same operation on a smaller selection. This amazing plugin is called resynthesizer, and the easiest way to install it is from Ubuntu's repository.

Some samples now.


Sinaia, 2000m altitude

Bucharest, Titan

PDF forms on Linux

I will explain a method of filling in forms inside PDF documents for printing or saving (to send, for instance, a signed copy of a contract via e-mail). I've seen other methods described (see here), but I didn't like any of them: most turn the PDF file into an image, which reduces quality and/or increases filesize, and pdfedit seems overly complicated.

Software required: gimp, pdftk.

First split the original pdf into separate pages (this is one disadvantage, pages need to be edited separately):
pdftk file.pdf burst

Next, for each page that needs changing (let's call it page1.pdf), do the following:
  • Import that page in gimp, using whatever dpi you want for any images you are adding (the higher the dpi, the better the quality. Try 300).
  • The page will show up on a new (and only) layer. Do any modifications on separate layers (if you add text, gimp will automatically insert layers, but if you want to use brushes, make sure you create a new layer that you'll edit).
  • When you're done, hide the background layer (the one with the PDF image), and print to a pdf file (say stamp1.pdf).
  • Now, put the newly created pdf on top of the original page:
    pdftk page1.pdf stamp stamp1.pdf
If your PDF was only one page, you're done. Otherwise, you should join all pages together:
pdftk page1.pdf page2.pdf [...] cat output output.pdf

Now all you need is a high-quality copy of your signature :)

Chrome performance going up!


I'm pleasantly surprised by the continuing advances in performance of the Chrome browser. Not only did it leave Firefox 3.6 in the dust, but it keeps getting better from one day to another. From FutureMark's Peacekeeper benchmark:

  • 5.0 Beta build: 3110
  • 6.0 Dev build: 3544
  • 6.0 Nightly build (Chromium): 3826
It's almost catching up with my girlfriend's score, which is the stable version, but a 44% faster CPU (her Core 2 Duo 2.40GHz vs my Core Duo 1.66GHz).

Firefox has improved some as well (in the image above, FF 3.0's score is from my girlfriend's computer), but it has lots of catching up to do...

Oh, I almost forgot. Watch this funny Chrome ad: http://www.youtube.com/watch?v=nCgQDjiotG0

Thursday, February 11, 2010

My variant of the Ginger Chicken with Peanuts Recipe


We just finished eating a delicious dinner, that I made by working around two other recipes. Since I definitely want to make it again, I'm saving the recipe here so I don't forget it. I'd also recommend all my friends to try it, since it's also easy to make.

Ingredients:
For the marinade:

  • 2 Tbsp soy sauce
  • 2 Tbsp sake (apparently wine should work too)
  • 1 Tbsp chicken seasoning
  • 1 tsp chilli sauce
  • a few dashes of salt and pepper
Other ingredients:

  • 250 g chicken breast, cut in 1cm cubes 
  • 1 small bowl (400g ?) of frozen vegetables (I combined pepper and broccoli mixtures)
  • 1 Tbsp flour
  • 2/3 cup water
  • 1/2 cup salted, roasted peanuts
  • 1 Tbsp soy sauce
  • 1 tsp minced or finely chopped fresh ginger
  • 1 Tbsp finely chopped Japanese pickled ginger
  • 2 Tbsp oil
Mix all the marinade ingredients well, so the seasoning almost dissolves. Put in the chicken and mix  some more. Leave for 20 minutes.

Mix the flour in the water until smooth and set aside. Defrost the vegetables. Preheat the oil in a pan.

Scoop the chicken out of the marinade and stir fry it until cooked. Add in the fresh ginger and the remaining juice from the marinade. Stir well. After 30 seconds, add the flour mixture, vegetables, pickled ginger and peanuts. Mix well, bring to a boil, then cover and simmer for 5 minutes on low heat. Serve over rice. Serves 2.

In Romania, you will find pickled ginger and soy sauce at Real (the sushi shelf in the fish section) and Mega Image (the international food section). You can also put more fresh ginger instead of the pickled one. You could probably substitute the chilli sauce with chilli powder, or skip it altogether.

Pofta buna!

Saturday, January 9, 2010

Spam

I just noticed someone is using my e-mail address to send spam. It's just apparent (only in the headers, it's not like they broke in my Gmail account), but I just received an E-mail can not be delivered reply to a message I didn't send. Upsetting.

Anyway, the mail seems sent from a French dedicated server, and it contains a link to a Russian site, probably meant to infect visitors with a virus or trojan of some sort.

Time to find the Report Abuse link on the French provider's site.