Visa Kopu

Visa Kopun blogi mielenkiintoisista asioista.

Installed trailer to a bike with hooded dropout

I bought a used Trixie dog trailer for my bike (Fuji Touring Disc) and when I started installing the hitch, it turned out to be more difficult than I expected. The bike has a "hooded dropout" which means that there's a protruding hood covering each end of the rear axle, protecting the bolt and the QR skewer. This caused a problem, because the hitch was too large to fit into the slot.

After banging my head to the wal... I mean doing thorough research on the Net, I found out that Burley makes hitch adapters which are specially shaped bolts that extend the rear axle outside the hooded slot. They don't have anything Burley-specific in them, so I got one for my bike.

Burley hitch adapter (on the left) and Trixie trailer hitch.
Burley hitch adapter (on the left) and Trixie trailer hitch.
Installing the rear axle extension.
Installing the rear axle extension.

The trailer hitch must be installed on the left side (non-drive side) of the bike which meant that I had to reverse the rear axle. Having the QR skewer on the drive side is not an issue per se (apparently some people think it should always be on the other side than the disc brake rotor) but the hooded dropout made it a little problematic. Because of that darned hood, there's only a couple of ways you can turn the skewer and that's backward or back and slightly upward. A mirrored QR skewer would be better, but I don't know if such exist.

On the drive side QR skewer must be closed backward.
On the drive side QR skewer must be closed backward.
Trailer hitch installed to the adapter.
Trailer hitch installed to the adapter.

Because of the weather outside I haven't been able to actually test the setup yet, but I hope next summer I can tour the world (or at least the town) with the dog.

Originally posted at

Bike trip to Estonia: Looking back at my pack list

A couple of weeks ago I wrote about my forthcoming bike tour to Estonia and listed the stuff I’m going to take with me. The trip was a great success and looking back, it was a good idea to pay attention on what to pack and what not.

Riding on the city streets of Kallaste, Estonia.

We didn’t originally have a fully planned route. Thetrip ended up to be five days (4 days riding, 1 day travelling back on train and ferry). We started in Tallinn, rode to the east to Lahemaa National Park, then towards Rakvere and Lake Peipus, visited The Onion Route, and finally ended our trip in Tartu. On the fifth day, we took the train back to Tallinn.

What worked

I really enjoyed our choice of route. The scenery is quite similar to the Finnish countryside except that there are no hills which is pretty great when you’re on a bike tour. The roads are very well maintained even in the rural Estonia (at least in these parts of the country), there were a surprising amount of separate bike paths, and the drivers behaved remarkably well. During the whole trip, there were maybe one or two cars that drove too close past us, but even they didn’t cause any accidents.

To carry most of the items, I used Thule Tour Rack and a pair of Ortlieb Back Roller Classic panniers. The Thule rack is attached with straps instead of screws, and I was a little worried that it wouldn’t stay on its place. However, on my Bianchi and with the amount of stuff that I had, it worked perfectly! If I had a bike that has screw holes, I would probably choose a regular rack, though.

The Ortlieb panniers are called Classic and not without a reason. They are well made, stay in their place, and now tested to be watertight. Highly recommended!

My Bianchi Via Nirone 7 is a nice bike and it didn’t have any technical problems during the trip. The riding position could’ve been a little bit more relaxed as my wrists started aching during the days. Having a little break every once in a while always helped and the pain never persisted.

After the trip, I was surprised how well I had packed for the trip. I basically didn’t have any extra items, apart from the first aid kit and the bike fixing kit, and I wouldn’t have left without them anyway.

The weather turned out to be a little colder and more unstable than what we hoped for. Gore Windstopper jacket worked superbly in those conditions, and I was really happy I didn’t leave it at home like I originally thought. Also, the leg warmers I bought from AliExpress for a few euros were great on a chilly and rainy day.

What didn’t work

There’s not much to list here. The lightweight cycling rain jacket from AliExpress was so-so; it either wasn’t very water-resistant or it made me sweat a lot, but after biking a couple of hours in the rain, my jersey was all wet. Probably the Gore Windstopper jacket wouldn’t have been much better in that weather, anyway, so I won’t say the rain jacket was useless. In the afternoon the weather got better, so thanks to having two jackets, I still had a dry Windstopper in the bag.

Because of the rainy weather, I didn’t use the SP Connect stem mount for the phone that much. Even though there is an extra rain cover provided, the phone is very open to the elements when mounted. I used the Apple Watch for tracking distances, and we used Regio’s Estonian cycling routes map (yes, it’s on paper!) for checking the next targets while we had breaks. A few times in the towns, especially in Tallinn, I had the phone mounted on the stem and actively used Google Maps navigation.

There were only a few items I ended up not using. I didn’t need the fouta (hammam towel) because all the places where we stayed provided us with towels. I didn’t use the swimming trunks because the weather was too chilly. Also, I didn’t use the lights for the bike, because we never rode that late in the night or early in the mornings. And as said, we didn’t have any issues with the bikes (or their riders), so we didn’t need the first aid kit or tools.

Fields somewhere south of Rakvere.

What I would do differently next time

Not much. Our daily distances were 93 km, 107 km, 79 km, and 72 km. Next time I would probably plan the distances to be more on the 70–90 km scale than over 100 km.

I won’t say that 100 km was too much, but it‘s not something I would like to do for many days in a row. If I was to go on a longer trip spanning over more days, I would probably plan a 1-day break after 4–5 days of cycling to relax and wash the laundry.

Our trip was relatively high-speed, so we didn’t stop by anywhere during the days except when having coffee or lunch breaks. It was always a bit awkward to enter a café when you’re all sweaty, walking uncomfortably in clip-in shoes, and dressed in lycra. Having a longer break every once in a while would also allow us to do tourist-y stuff like sightseeing. Riding with lower speed and sweating less would of course be an option, but I’m not sure if it’s viable for me.

And will there be a next time? Well, we already started to discuss taking the ferry from Helsinki to Lübeck and riding towards the Netherlands. Maybe next summer!

Here we have just reached our destination on the Day 4.

Originally posted at

Bike trip to Estonia: My gear and pack list

Estonian coast in summer.

I’m soon leaving on my first multi-day bike touring trip. A friend and I are planning to take the ferry from Helsinki, Finland, over to Tallinn, Estonia. From there we will ride along the northern coastline to Viinistu in Lahemaa National Park. On the next day we will move south to Laekvere and then to Lake Peipus. On the fourth day we’re thinking to take the train from Tartu back to Tallinn, but we haven’t actually planned anything that far yet. The daily distances will probably be around 80–100 km.

We’re not taking any tents, sleeping bags, or cooking items with us, since we’re staying in hotels and Airbnb’s. This will help us to reduce the weight significantly.

Bianchi Via Nirone 7 with bags.

The bike

My bike is a 2019 Bianchi Via Nirone 7. It’s not a touring bike by any means, but since we’re only riding a few days with quite a little amount of stuff, it’s probably good enough.

The racks and bags

Thule Tour Rack is not pretty, but I think it will do its job.

The Bianchi is a road bike, so it doesn’t have any holes for attaching a rack. That’s why I’ve opted for Thule Tour Rack fitted with Pack ‘n Pedal Side Frames to carry a pair of Ortlieb Back Roller Classic panniers which my wife found with a ridiculously low price from a thrift store (€30, unused!). The panniers are a bit on the large side, but they are sturdy, waterproof, and fit nicely on the Thule rack.

I’m also taking a Rockbros tube bag (a “gas tank bag”) that I bought from AliExpress for €11. It fits my wallet, some snacks, and other frequently used items. Also, I might have a power bank there to charge my phone while riding. Speaking of which, for the phone I have a SP Connect bike mount right on the stem.

Next time I may try bikepacking and use a saddle bag and a handlebar bag and maybe a frame bag, but they offer so much less space than traditional panniers that I didn’t feel comfortable to try managing with that little amount of stuff on my first longer bike trip.

Riding gear

I’m used to riding in my MAMIL uniform, so I’m taking bib shorts and a cycling jersey with me on the trip. It would probably be more convenient to use more relaxed clothing, for example to have a break in a café or visiting a toilet, though.

  • Craft bib shorts
  • SUGOI jersey
  • Gore Windstopper jacket (I was going to leave this at home, but the evenings have suddenly turned much colder, and the jacket can be used both on and off the bike)
  • Diadora X Tornado SPD shoes (originally MTB shoes, so they are at least a little easier to walk with)
  • Etto Stelvio helmet
  • DeFeet socks
  • Lightweight cycling rain jacket from AliExpress
  • Leg and arm warmers from AliExpress (much lighter to carry than extra jersey or pants with long sleeves)
  • Rockbros cycling eyewear (again from AliExpress, dirty cheap at €10)

Off-the-bike clothing


  • 45x90 cm fouta (hammam towel, much lighter than a regular bath towel)
  • Super lightweight 6-gram toothbrush and a fitting size toothpaste
  • A Gillette razor with the handle cut in half and Sea To Summit Pocket Shaving Soap (19 grams in total!)
  • Deodorant
  • Travel size hairbrush and hair wax
  • Tammed Cyclo first aid kit for cyclists
  • Painkiller and other medication
  • Sunscreen
  • Hand sanitizer
  • Chamois cream
  • Ear plugs
  • Nail clippers (can also substitute for tweezers)

Other items

  • Wallet and passport
  • An IKEA pencil
  • A spork
  • Chain oil
  • Duct tape
  • Energy gel, SIS caffeine shots, and other snacks
  • Drink bottles: Camelback Podium 0.71 l and Elite Corsa 0.55 l
  • Elite Custom Race bottle cages (x2)
  • An iPhone 7 and an Apple Watch with charging cables
  • Apple Europlug USB charger (one of the smallest chargers I know)
  • A power bank with two USB ports (can also be used as a hub to turn the Apple charger’s one USB port into two for charging the power bank, the phone, and the watch at the same time)
  • Leatherman Skeletool
  • Multitool
  • Extra inner tube
  • Patching kit with multiple tire levers
  • BBB EasyRoad mini pump
  • MagicShine MS-622 lights (front and rear, very minimalistic, weighing only 57 grams in total)
  • Biltema folding lock and an Abus locking cable with loops
  • A lightweight wire lock for panniers (so that nobody can just grab them along)
  • KMC MissingLink reusable chain connectors for fixing broken chains

Originally posted at

Best SSH tip of the year

Why didn’t anyone tell me about transparent multi-hop SSH before?

We have production servers that are not directly accessible through the Internet with SSH. To access the server, you have to first log into a proxy host and from there you can ssh to the actual host. The production servers are not even in a domain that would be resolved through public DNS.

This is of course very secure and all, but makes it difficult to locally run scripts that access the production host. But, ProxyCommand to the rescue!

Let’s say our servers are located at something.foobar.mgmt and our proxy host is at Now, edit your ~/.ssh/config file and add this:

Host *.foobar.mgmt
  ProxyCommand ssh -A -W %h:%p

After adding these two lines, you can directly do ssh something.foobar.mgmt and SSH will transparently proxy your connection through the other host.

And if that’s not enough, scp and sftp will also work straight away using the same configuration.

Thanks, Ari!

Originally posted at

JavaScript one-liner to get element’s text content without its child nodes

A testing engineer here at work asked me how he would be able to get an element’s text content without the text inside the possible child elements.

The JavaScript DOM doesn’t give us a method to do that directly, but there’s a one-line solution that uses some interesting JavaScript tricks.

Examples (not real world examples)

The problem with using parentElement.textContent directly:

<h1>Page title <em>Other stuff</em></h1>
  -> "Page title Other stuff"

<p>My <blink>great</blink> website</p>
  -> "My great website"

What we want to achieve:

<h1>Page title <em>Other stuff</em></h1>
  -> "Page title "

<p>My <blink>great</blink> website</p>
  -> "My  website"

The solution

// Get the parent element somehow, you can just as well use
// .getElementById() or any other DOM method
var parentElement = document.querySelector('#myDiv');

// Returns the text content as a string
[], function(a, b) { return a + (b.nodeType === 3 ? b.textContent : ''); }, '');

How does it work?

DOM element’s childNodes property is not an array even though it looks like one. It’s actually an instance of NodeList which doesn’t have the usual array methods, such as .forEach(), .map() or .reduce(). Luckily, we can easily borrow them from Array by using the .call() method found in the Function prototype.

So, we’re calling Array.prototype.reduce with a NodeList by creating an empty array and using its method:

[], callbackFn, initialValue);

// same as this, but we saved some characters, callbackFunction, initialValue);

The .reduce() method takes one mandatory parameter – the callback function – and optionally the initial value. As stated by MDN:

The reduce() method applies a function against an accumulator and each value of the array (from left-to-right) has to reduce it to a single value.

We want the end result to be a string, so we give an empty string as the initial value.

Our callback function looks like this (replaced the one character variable names with slightly more descriptive ones):

function(result, childNode) {
  return result + (childNode.nodeType === 3 ? childNode.textContent : '');

The function will be called for each child node (including the text nodes, not only elements separated with HTML tags) that our parent element has.

The result parameter contains the string that has accumulated so far.

The childNode parameter contains the node currently being processed. First we’ll check the child node’s type. If it’s a text node (its nodeType is 3, also found in the constant Node.TEXT_NODE), we concatenate the node’s textContent to the result. Otherwise we concatenate an empty string, keeping the result intact.

What about whitespace?

As you may have noticed, textContent property contains all the whitespace between the elements, including linebreaks. If you need them trimmed, I’ll let you do that as a homework.

Thanks to Javier Márquez for publishing the blog post Learning much javascript from one line of code which gave me a great starting point.

Originally posted at

Tämä on vanha sivusto. Löydät minut esimerkiksi täältä: Roxeteer Media Oy, Instagram ja Twitter.