Parser pre slovnik.sk

March 12th, 2010

Vedeli ste, že slovník na stránke slovník.sk je momentálne celkom jednoducho parsovateľný ? Samozrejme ak to začne niekto zneužívať predpokladám, že to páni vývojári zmenia, ale momentálne sa dá celkom jednoducho dotazovať vďaka rozumnému formátu URL pri dotazovaní cez HTTP GET. Je to z programatického hľadiska oveľa prehľadnejšie ako napríklad taký cestovný poriadok na cp.sk. Tutok je môj java kód, na odoslanie jedného dotazu. Určite by sa to dalo napísať aj krajšie a vôbec som to netestoval, to len tak pre demonštračné účely.



package sk.linhard.slovnik;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Parser for slovnik.sk
 @author Michal Linhard
 *
 */
public class SlovnikRequest {
  public static class SlovnikTranslation {
    private String from;
    private String[] to;

    public SlovnikTranslation(String aFrom, String[] aTo) {
      from = aFrom;
      to = aTo;
    }
    
    public String getFrom() {
      return from;
    }
    
    public String[] getTo() {
      return to.clone();
    }
  }
  
  public static final String DEFAULT_URL = "http://slovnik.azet.sk";
  
  private String term;
  private String lFrom;
  private String lTo;
  
  /**
   * Create a request object.
   @param aTerm Term to search for
   @param aLangFrom Language to translate from
   @param aLangTo Language to translate to
   */
  public SlovnikRequest(String aTerm, String aLangFrom, String aLangTo) {
    term = aTerm;
    lFrom = aLangFrom;
    lTo = aLangTo;
  }
  
  private String encodeReqURL(String aTerm, String aLangFrom, String aLangTo) {
    StringBuffer sb = new StringBuffer();
    sb.append(DEFAULT_URL);
    sb.append("/?q=");
    sb.append(aTerm.replace(' ''+'));
    sb.append("&l=");
    sb.append(aLangFrom);
    sb.append("-");
    sb.append(aLangTo);
    return sb.toString()
  }
  
  private String slurp (InputStream inthrows IOException {
    try {
      StringBuffer out = new StringBuffer();
      byte[] b = new byte[4096];
      for (int n; (n = in.read(b)) != -1;) {
          out.append(new String(b, 0, n, "UTF-8"));
      }
      return out.toString();
    finally {
      if (in != null) {
        in.close();
      }
    }
  }
  
  private List<String> findPTables(String src) {
    return findTags(src, "<table class=\"p\">""</table>");
  }
  
  private List<String> findTableRows(String src) {
    return findTags(src, "<tr>""</tr>");
  }
  
  private List<String> findTags(String src, String tagBegin, String tagEnd) {
    List<String> r = new ArrayList<String>();
    int idx = src.indexOf(tagBegin);
    while (idx != -1) {
      int idxend = src.indexOf(tagEnd, idx);
      if (idxend == -1) {
        throw new RuntimeException("tag not ended");
      }
      r.add(src.substring(idx + tagBegin.length(), idxend));
      idx = src.indexOf(tagBegin, idxend);
    }
    return r;
  }
  
  public SlovnikTranslation[] perform() {
    try {
      URL u = new URL(encodeReqURL(URLEncoder.encode(term, "UTF-8"), lFrom, lTo));
      System.out.println("---- QueryURL: " + u.toString() " ----");
      List<SlovnikTranslation> result = new ArrayList<SlovnikTranslation>();
      String input = slurp(u.openStream());
      for (String eachPtable : findPTables(input)) {
        String termFrom = null;
        List<String> toTerms = new ArrayList<String>();
        for (String row : findTableRows(eachPtable)) {
          Matcher mTR = Pattern.compile(
              "<td class=\"z\"[^>]*>\\s*(.*)\\s*</td>\\s*" +
              "<td class=\"sipka\">\\s*&nbsp;&rarr;&nbsp;\\s*</td>\\s*" +
              "<td class=\"do\"[^>]*>(.*)\\s<a[^>]*>[^<]*</a>\\s*" +
              "<div[^>]*>[^<]*</div>\\s*</td>", Pattern.DOTALL).matcher(row);
          if (mTR.find()) {
            if (termFrom == null) {
              termFrom = mTR.group(1);
            }
            toTerms.add(mTR.group(2));
          else {
            System.out.println("TERMS NOT FOUND FOR ROW: " + row);
          }
        }
        if (termFrom != null && !toTerms.isEmpty()) {
          result.add(new SlovnikTranslation(removeSpans(termFrom), toTerms.toArray(new String[toTerms.size()])));
        }
      }
      return result.toArray(new SlovnikTranslation[result.size()]);
    catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
  
  private String removeSpans(String atermFrom) {
    Matcher m = Pattern.compile(
        "[^<>]*<span>([^<>]*)<span class=\"highlight\">([^<>]*)</span>([^<>]*)</span>[^<>]*")
        .matcher(atermFrom);
    if (m.matches()) {
      return new StringBuffer().append(m.group(1)).append("|").append(m.group(2)).append("|").append(m.group(3)).toString();
    else {
      return atermFrom;
    }
  }
  
  public static void main(String[] argsthrows Exception {
    SlovnikTranslation[] result = new SlovnikRequest("žena""sk""es").perform();
    for (SlovnikTranslation t : result) {
      System.out.println("---- translation of \"" + t.getFrom()+"\" ----");
      for (String s : t.getTo()) {
        System.out.println(s);
      }
    }
  }
}


JBoss automatic startup in Ubuntu 9.10

March 3rd, 2010

I come from Windows background, where I start and stop my development app server instance conveniently from Eclipse and view the server and app log directly as the standard console output.

JBoss has been running on my linux server for about 4 months now, but I never found time to make it start automatically at system startup. I had to start it manually with run.sh all the time. Now when I’m transferring it to other hardware and system and I’m configuring everything all over again, I decided finally to settle this matter once and for all. I’m runnig JBoss AS 5.0.1 GA. So this is the story. It uses my real directories, because I don’t want to spoil the narration by expressions like %JBOSS_HOME%.

My JBoss resides in /data/server/jboss and the configuration I’m running is default” (of course I edited it for my purpose, and mostly it is based on “web” configuration).

So the main startup script is /data/server/jboss/bin/run.sh

I edited /data/server/jboss/bin/run.conf to my liking (set the JAVA, JAVA_HOME vars, set 512MB memory via JAVA_OPTS and added pluggable-instrumentor.jar for JBoss AOP)

Then I took /data/server/jboss/bin/jboss_init_redhat.sh and copied it to /etc/init.d/jboss. The command that adds the symlinks to the /etc/rc?.d directories looks like this:

sudo update-rc.d -f jboss start 84 2 3 4 5 . stop 15 0 1 6 .

The numbers 84 for start(S) links and 15 for stop(K) links are taken from a JBoss community howto page.

But the update-rc.d script didn’t like it, because it missed some “LSB Information“. So I added this and my final script looked like this:

#!/bin/sh
#
# Modified JBoss Control Script

### BEGIN INIT INFO
# Provides:          jboss
# Required-Start:    $local_fs $syslog $network $named
# Required-Stop:     $local_fs $syslog $network $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start JBoss
# Description:       Starts JBoss Server
### END INIT INFO

#define where jboss is - this is the directory containing directories log, bin, conf etc
JBOSS_HOME=${JBOSS_HOME:-"/data/server/jboss"}

#define the user under which jboss will run, or use 'RUNASIS' to run as the current user
JBOSS_USER=${JBOSS_USER:-"misoli"}

#make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/lib/jvm/java-6-openjdk"}

#configuration to use, usually one of 'minimal', 'default', 'all'
JBOSS_CONF=${JBOSS_CONF:-"default"}

JBOSS_HOST="linux"
JBOSS_JNP_PORT="1099"

#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b $JBOSS_HOST"}

#define the classpath for the shutdown class
JBOSSCP=${JBOSSCP:-"$JBOSS_HOME/bin/shutdown.jar:$JBOSS_HOME/client/jnet.jar"}

#define the script to use to start jboss
JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF $JBOSS_BIND_ADDR"}

if [ "$JBOSS_USER" = "RUNASIS" ]; then
 SUBIT=""
else
 SUBIT="su - $JBOSS_USER -c "
fi

if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then
 # ensure the file exists
 touch $JBOSS_CONSOLE
 if [ ! -z "$SUBIT" ]; then
 chown $JBOSS_USER $JBOSS_CONSOLE
 fi
fi

if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then
 echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
 echo "WARNING: ignoring it and using /dev/null"
 JBOSS_CONSOLE="/dev/null"
fi

#define what will be done with the console log
JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}

JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"java -classpath $JBOSSCP org.jboss.Shutdown --shutdown -s $JBOSS_HOST:$JBOSS_JNP_PORT"}

if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
 export PATH=$PATH:$JAVAPTH
fi

if [ ! -d "$JBOSS_HOME" ]; then
 echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
 exit 1
fi

echo JBOSS_CMD_START = $JBOSS_CMD_START

case "$1" in
start)
 cd $JBOSS_HOME/bin
 if [ -z "$SUBIT" ]; then
 eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
 else
 $SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
 fi
 ;;
stop)
 if [ -z "$SUBIT" ]; then
 $JBOSS_CMD_STOP
 else
 $SUBIT "$JBOSS_CMD_STOP"
 fi
 ;;
restart)
 $0 stop
 $0 start
 ;;
*)
 echo "usage: $0 (start|stop|restart|help)"
esac

Please note that jboss should be run under it’s own user e.g. jboss. For convenience reasons I’m using my regular username, which is a little less safe.

Main gotchas that I’ve encountered

1. The main JBoss community site that explains this process said, that on most linux systems JBoss should run on runlevel 3, but that’s not the case with Ubuntu, where the normal (all features on) runlevel is 2.

2. For shutdown to work properly I had to add the command line option -s server:port to the shutdown part of the script, and turn on the JNP service. For me that meant setting the Port attribute for mbean “jboss:service=Naming” to the value 1099 (from original value -1, which is set in configuration “web” on which I based my “default”) in the file /data/server/jboss/server/default/conf/jboss-service.xml

Of course, for the oblivious, /etc/init.d/jboss has to be executable (chmod +x).

I also made a handy little shortcut for log viewing command: tail -20 /data/server/jboss/server/default/log/server.log (which is also conveniently viewable by Ubuntu util System > Administration > Log File Viewer as I discovered)

Know Your Meme: Om Nom Nom

December 31st, 2009

Ľudia od Know Your Meme (http://knowyourmeme.com/) robia úžasnú prácu, ktorú veľmi obdivujem a uznávam.

Preto som sa rozhodol, že zopár ich náučných videí otitulkujem po slovensky, nech sa môžu vzdelať aj ľudia, ktorí nespeakujú.

Tuto je prvé otitulkované video, ktoré som spravil cez Overstream.

Know Your Meme: Om Nom Nom

Linhard.sk je na mojom hardwari

October 28th, 2009

Linhard.sk beží už konečne na mojom hardwari a je plne v mojich rukách. Server je teraz absolútne nezabezpečený proti výpadkom elektrického prúdu alebo internetového pripojenia. Ale má to aj nesporné výhody.

Pozor na podpisovanie binárnych reťazcov …

September 28th, 2009

Tak som si znova študoval čosi o digitálnych podpisoch. Len tak na okraj, že prečo preboha: Vyvíjam zrovna Java klientskú aplikáciu, ktorú by som rád distribuoval ako applet alebo cez Java Web Start. Kvôli náture aplikácie sa však potrebujem pripojiť na vzdialený server, čo je však Java Runtimom považované za citlivú operáciu a keď kód chce bežať ako applet alebo cez Java Web Start, tak je pod dohľadom otravného security managera a ten takéto operácie neoblomne zamieta hádzaním security exsepšien (genitív množného čísla od anglického slova exception). Jednoduchým spôsobom ako toto vyriešiť je svoj kód podpisovať, čo znamená mať svoj pár kľúčov, certifikát atď atď.

Tak som si znova načítal wikipeďácku stránku http://en.wikipedia.org/wiki/Digital_signature a začal po 467. krát študovať. Matematika ohľadom kryptografie v PKI schéme mi do hlavy nejde vôbec, ale samotná schéma je celkom jednoduchá a jasná akurát, že vždy zabudnem detaily typu kedy sa z čoho robí hash, čo sa k čomu prikladá a tak.

Potom som si vygúglil, že čo by momentálne mohla byť moja certifikačná autorita a celkom ma potešilo zistiť, že už aj v našej malebnej krajine máme celkom dobrú ponuku. Kukal som firmu Disig, ktorá ponúka zaujímavé produkty, certifikované od NBÚ. Už aj veci ako čipovú kartu alebo usb kľúč na ukladanie privátneho kľúča sa ponúkajú v cenách ktoré si môže dovoliť aj bežný kostelový človek ako ja.

Neviem prečo, ale dostal som chuť prečítať si slovenský zákon o elektronickom podpise, že čo by som tak mohol ešte robiť zo svojím zaručeným elektronickým podpisom, kebyže si ho kúpim od nejakej CA.

Ale čo ma najviac zaujalo na celom tomto researchi bol článok (PDF tuná) na ktorý som sa dostal cez spomínanú wikipedia stránku, ktorý hovoril o jednom zaujímavom spôsobe (z milión iných) ako kompromitovať digitálny podpis.

Ide o to, že to čo sa vlastne pri digitálnom podpise podpisuje je sekvencia bitov. Pre nás samotná táto sekvencia nemá valný význam pokiaľ sa nejako neinterpretuje, povedzme ako PDF dokument, alebo iný formát ako napr. HTML, XML alebo aj slávny DOC. Dôležité je to, aby človek vedel, že to čo podpisuje je nejakým dobre definovaným spôsobom spojené s tým čo pred sebou vidí. Autori tento princíp alebo požiadavku nazývajú WYSIWYS (What You See Is What You Sign). Interpretácia binárnych reťazcov je mojou srdcovou témou teoreticko-informatických kontemplácií, preto som si neodpustil nepodeliť sa so zážitkom z čítania.

Autori článku načŕtajú pár zaujímavých útokov na podpisový mechanizmus. Napr. Keď sa podpisujú XML dokumenty a nepriloží sa k nim ich schéma alebo DTD, tak môže veľmi jednoducho nastať problém interpretácie. To čo ste podpísali môže mať pri inej schéme úplne iný význam.

Ešte zaujímavejšia je úvaha o fontoch. Ak používam aplikáciu, ktorá renderuje text pomocou fontov, tak si musím byť istý, že také isté fonty bude mať aj každý človek, ktorého sa môj podpísaný dokument nejako týka. Citlivé su napríklad znaky ako $, ale hypoteticky sa dá uvažovať aj nad “malicious userom” ktorý velice chytro vymení glyfy tak aby ste si mysleli, že podpisujete niečo nevinné a pritom mu dávate plnú moc na svoje bankové konto alebo iné fajnovosti.

Pre ľubovoľné binárne dáta, ktoré majú byť kódovaním nejakej grafickej informácie autori radia vždy vytvoriť si aj bitmapu samotnej grafickej reprezentácie a tú (poprípade len jej hash) vždy prikladať k podpisovaným dátam. Budete tak mať zaručené, že podpisujete skutočne to čo ste videli.

Free the Pirates!

July 8th, 2009

The BitTorrent protocol is one of the most beautiful technologies of recent years. Not only because of what it can do – Free sharing of information among Internet users – but also because of it’s ingenious design from the computer science point fo view. It’s quickly become my favourite means of peer-to-peer filesharing.

The PirateBay has been my favourite BitTorrent tracker for a long time now. It’s always been a server with a soul for me. Each time I’m there to search for a torrent, I feel kinda welcome. Shockingly, recent trials have sentenced it’s creators for 1 year of jail and each of them has to pay over 650 000 euro. I feel that it is unacceptable that people behind this wonderful and admirable site are punished for creating it.

I don’t agree with several ideas of the (originally) Swedish Pirate Party’s principles regarding copyright law. I don’t like the idea of drastically shortened period of copyright protection and they do not have a clear definition of what is „non-commercial“ use of the content. Their principle document points out the crucial problems very well but doesn’t offer viable alternatives.

However, they are absolutely right when it comes to citizen’s right to privacy and to share information. I have few bits on my hard drive and if I and my friend Johnny want, he can have exactly the same bits and there ain’t no fucking way anyone’s gonna tell us he can’t, because he can. That is the wonder of this technological era. And consequently a real challenge to content makers.

It is intrinsic property of information that it is easy to copy and spread. With modern cryptography it is easy to conceal information which is not meant to be public and to create really secure communication channels. But once I decide to tell my stuff to the outside „untrusted“ world, there’s no way I can control it’s spread. That’s the catch and we have to live with it. Digital rights management and other oppresive tools try to piss against the wind and control the uncontrollable. Spreading the information existed for many years, even before invention of print. Once I heard something I could decide to tell it further, once I saw something I could describe or paint it so that others could see it. Technology only brings quality to the copies.

The people trying to make money by selling copies are sad, because this world isn’t fit for their business models that worked so well 50 years ago. Any new technology that facilitates free spread of information is another big strike to their profit stack. The guys from the Pirate Bay only created a new technology, which hurt these people really bad (imagine a giant media corp. CEO struck by a declining sales graph on a report that he reads on a leather sofa in his yacht) and now they got punished for their invention.

I am not a communist. I understand business (a bit). If I produce something I want to get paid. Possibly enormously well. I am a content maker myself. But do we really want to punish inventions ? Is that what copyright is about ?

My idea is to finally accept the fact that any „information product“ today is very easily copiable, once made public and not fight it. It’s a lost battle, so why not give up now and save ourselves lot of energy. Instead let’s start to work on new business models and technologies allowing rewarding the content makers and stop putting intelligent people in jail, because we need them in this process.

May 10th, 2009

Robocop Vedeli ste, že Robocop fičal na MS-DOSe ? :-)

¿y Tú Qué Has Hecho?

April 9th, 2009

Esta canción de Buena Vista Social Club, he oido tantas veces, pero sólo ahora he mirado a las letras. Muy impresionante. No conozco muchas nuestras canciones tradicionales o folk que tengan tanto sentimiento. Me gusta mucho.

¿y Tú Qué Has Hecho?

En el tronco de un árbol una niña
Grabó su nombre henchida de placer
Y el árbol commovido allá en su seno
A la niña una flor dejó caer.

Yo soy el árbol conmovido y triste
Tu eres la niña que mi tronco hirió
Yo guardo siempre tu querido nombre
¿y tú, qué has hecho de mi pobre flor?

Aalborg & Skagen

April 6th, 2009

Well, to write about the last days of a trip is the hardest. One lacks motivation. Mainly because one knows that he or she’ll be at home in couple of days and he or she knows, that he or she (oh, damn it, gender neutral talk, in this case it’s me) can tell everything verbally. But! I realised that I may later use this kind of text as a good memory restoration tool, when I want to remember the trip. And it will be the only way too as we forgot to take the f**king camera with us for the most interresting parts. So let’s do it. Even when it’s almost a week late news. This time in English again, since I’ve told everyone at home already, and I am in this international mood again.

First thing that is cool about our(me and Jano) trip to Skagen is that Skagen is the northernmost place of Denmark. There is something very attractive for me in these something-most places. It is the property of this very thin thingies protruding from the land to the sea, that if you stand on that tip and there’s only one direction you can walk to, that makes it kinda magical. I’ve experienced similar constellation of land in Gibraltar (point Europa) the last summer and that was wonderful too. Second cool thing is that it was my very first car-roadtrip. We counted the expenses we would need to get to Skagen by train, bus, public transport etc and found out, that it would be much cheaper to hire a car. Then we realized that hiring the car via a car rental company is much more expensive and we’ve made a mistake in our calculations but, we were lucky because one of Viera’s (Jano’s sister at whose place we were staying) friends was very kind to ask his granny about her unused car and she made us a deal: 1,5DK/km that was very generous. So saturday about a noon, we’re sitting in this 93 Honda something, floor covered in straw, cruise controller set at proper 80km/h (Denmark’s speed limit outside towns), leaving Herning and headed for Viborg, our first stop. Jano was driving during the whole car-trip. Not because I won any “who drinks and who drives” battle, merely because Jano didn’t trust my driving skills at all, but I didn’t care and enjoyed the view.

Viborg on the map seemed like a small-sized town of close to no significance, so that we’ve almost skipped it. But spending a couple of hours there was really worth it. It was my first contact with the nice Danish historic towns. Next time I read in a tourist guide that a town was the main residence of some ancient kings in middle ages, I’ll take it more seriously. And the lake in the middle of the town is cute too. And the Psychiatric hospital on it’s side. When my computer science profession finally get’s me, I’d want to spend my days rehabilitating there. So we’ve taken a nice romantic walk around the lake watching ducks and inventing stories about them. Mostly about relationships between male and female ducks. Btw. during our roadtrip we’ve done so many romantic walk’s with Jano, that If I did the same amount with some only-slightly-attracted-to-me-and-still-hesitating girl, I’d definitely get laid.

Our goal of that day was Aalborg. It’s like a second largest city in Denmark. At least something, since we’ve only seen Copenhagen from train and a bit from plane (well actually the whole Copenhagen, but from unpractical distance for observation). So back to Aalborg. Another town with it’s nice historical stuff, but this time with some bonuses of a larger city: clubs. About that later. We arrived there at about 5 o’clock. Again did some walking, again ended in a coffee bar (KlosterTorvet, nice one). There we’ve phoned our CouchSurfing host Nicholas and arranged a meeting in front of the McDonald in the center. (Them McDonald’s logos. As they’re almost always the hideous smudge of the city center’s historic look, they’re as well wonderful meeting points) Nicholas left his bike in town and we’ve driven to his place. He lives in a student dormitory. He and his flatmate Francesco, have a two room flat with entrance from a hallway with common kitchen. Kinda similar with Slovak student dorms, but little less mess. We got to sleep on the floor of Nicholases room. Nicholas showed us on the map of Aalborg that most interresting places are basically around that place where we met in the center. We wanted to check out the city a little bit more so we arranged that we’ll go out, then come for dinner and then go for drinks together with our hosts. So we went to the center, saw about three more interresting streets and buildings and again ended up in a coffee bar, where for the 48579th time we’ve discussed women, why I cannot get laid and wtf is my problem. All the time, we had a strage feeling that the waitress serving us was from Czech republic or Slovakia and understood everything we talked about, when she was around.

Then we went straight to Nicholases place, had good bolognese spaghetti Nicholas prepared for us and went to town again. Nicholas told us that he doesn’t want to stay late because he had enough yesterday, which was pretty much the same we didn’t want, because we wanted to head out to Skagen early in the morning. So Jano even generously decided not to drink and drive us to the town. (The previous plan was to ride a bike). The guys took us to this very cool underground club called 1000fryd, with the same level of undergroundness and alternativeness as our Subclub in Bratislava, but much cleaner and pleasant. We hit some alternative disco night (As far as my music recognition brain center could tell). I came to bar and asked for a non-alcoholic drink for Jano and a beer for me. The barman, who had a significant part of his face covered in piercing, was a very nice guy, who gladly described to me all the non-alcoholic beverage they had on the wall behind the bar. Finally I chose a rather unpleasant orange lemonade Jano almost spit back to my face, but what can you do. (Well after he was done, I’ve invited him to exactly the same, wachachacha… When he recieved the second bottle he’s taken the etiquette from the bottle as a proof of his great self-sacrifice to remind me of it for the rest of my life). Then we had some talk with the barman about sqatting in Europe, sat down for a while, chatted with our hosts, I almost initiated a discussion with a completely strange girl (that story is much better, when told by Jano… so I won’t bother) and then we went back.

We’ve woken up around 8:30 (when I say around I mean a bit later than that) packed our stuff and headed out to Skagen. All the way the weather was quite nice (for Denmark at least) but Skagen was totally covered in fog. We went straight to the Grenen, the northernmost point of Denmark. We parked the car on official Grenen touristic parking spot, thankful that off the season all the parking ticket vending machines were on holiday. We walked cca 20 min. along the sea shore (the only way how to not get lost in the fog) and finally reached the northernmost piece of Danish land. Then we kept wandering near the coast, still in quite dense fog. We went quite far from the crowd concentrated mostly on the “main” point, photographying their children on the junction of the northern an the baltic sea, so we ended up completely alone. The beach was made of a soft sand covered with little stones of different colors, so we collected some of them. Jano’s goal was a nice piece of every color, mine was to find the blackest stone possible. Then I wrote the link to my website to the sand in 1meter big letters and we were good to go. As the fog became a little thinner we decided to not return the same way and wander around a bit in the sand dunes further from the sea. To my surprise, we didn’t get lost and returned happily to the parking place. We checked the center of Skagen, had some fastfood and coffee in the harbour.

Another attractions we had to see according to the tourist guide were “Den tilsandede kirke”, a church that was built in 12. century and unfortunately for the churchgoers one sand dune decided to settle itself exactly on its location, so today only a tip of it’s tower can be seen by interrested tourists. Another spot was another (allegedly “wandering”) sand dune called “Råbjerg Mile”, probably without any significant building under it (yet). So I did another website sand link and we were done with our touristic goals at around 4. We had to be in Herning at 8 to return our car. So we decided to take exactly the same highway that we had taken to come here. Anyway, we were too tired to observe anything more.

Výletík do Århusu

March 26th, 2009

Dnes sme sa s Janom odhodlali na prvý seriózny výletík do mesta Århus. Ževraj pekné historické centrum a tak. Z domu sme sa vykiepili niečo pred obedom. Jediný problém dňa nastal pri automate na vlakové lístky. Viera nám napísala na lístoček kvalitný návod s kľúčovými slovami v dánštine, ako máme stláčať po sebe gombíky, ale ja som aj tak smelo vyrazil spýtať sa dvoch lokálnych sympatických dievčat sediacich na zastávke, či by nám s objednávaním nepomohli. Nepomohli. Automat sa nechcel nechať presvedčiť nech prijme aspoň jednu z našich platobných kariet. Mali sme pri sebe len veľké bankovky, žiadne mince. Vyzeralo to už, že sa na vlakový trip budeme musieť vykašlať a vrátiť sa domov pre mince, ale jedna z lokálnych dievčin nám poradila, že ujovia vo vlaku niekedy bývajú “nice” a nedajú ti 600 DK pokutu, keď im pekne vysvetlíš, že automat na zastávke nefungoval. Boli dokonca ochotné sa za nás natívne prihovoriť. To ma celkom posmelilo, tak sme nakoniec do vlaku nastúpili. Vo vlaku Jano situáciu ešte prediskutoval cez telefón s Vierou a dospel k názoru, že pokutu 600DK (na jedného) radšej nebude riskovať. Ja som sa teda k jeho obavám pripojil a vystúpili sme pri najbližšom zastavení v mestečku Ikast, kde sme si kúpili lístok normálne za prepážkou a počkali pol hoďku na ďalší vlak.

Århus je také pekné útulné prístavné mestečko. Tak sme sa tam trošku pomomŕňali, kým sme nezačali mierne omŕzať, potom sme zmohnutí zamierili do nejakej kavianičky na čosi teplého a dali sa na ústup. Kostolíky, domčeky, no je to pekné, ale dokážem si to obzerať tak hoďku a stačí…