Javascript querySelector

The most often jQuery use-cases contain some selector. jQuery uses Sizzle library. But how can it be done in plain javascript? The cool methods are document.querySelector() and document.querySelectorAll(). Less advanced that jQuery selectors, but works default in modern browsers. More at


SCP remote-to-remote copying

Using scp (secure copy, over ssh) for remote-to-remove copying has a bit unexpected behaviour for me. The expectation was, that copied data are transfered through machine where scp command runs. But this is not the default behaviour of scp. Default copy scenario between two remote hosts makes a direct connection from source server to the destination server. That sounds quite reasonable, except cases when servers cannot see each other. $ scp src\_server:/some\_dir/* dest\_server:/some\_another_dir Solution is to use -3 parameter, which forces copy data over local machine.

#linux #cli

Online maps with Leaflet

Many web applications needs show a map, included my Rails apps:-) I considered replace Google Maps to avoid share informations with “big brother”, but all solutions were bounded with some provider. Finally, Leaflet.js using OSM looks acceptable. Nice map previews:

Local mail delivery in Rails

You propably hear about delivery_method in ActionMailer. Common value is either :smtp or :sendmail. SMTP is good customizable. It uses localhost mail server by default, but it can be configured to use external server with some authorization (gmail mail servers, etc.). Disadvantage could be higher error-raise propability and low performance. Sendmail delivery method looks less usable, but it can be very good combined with well configured local mail server. Local mail delivery is:

#linux #rails

Blog started

Hi, I decided create a blog to improve writing skills and make my programming ideas more solid:-) There were two blogs in the past which I contributed to (both in Czech language)