Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home - Blog

How to get in-page attributions semi-automatically out of Flickr

Posted by admin |

This is a stop gap solution.

First, add this to your CSS:

.attribution:hover .attribution-info {
    display: block;

.attribution-info:hover {
    display: block;
.attribution-info {
    display: none;
    background: #C8C8C8;
    margin-left: 28px;
    padding: 10px;
    position: absolute;
    z-index: 1000;


Secondly, execute this scipt on a Flickr photo page. I use tha javascript console, but I wonder if there is a way of making this into a bookmarklet:

window.prompt('Info', '<span class="attribution">(Attribution) <span class="attribution-info">Author: ' + $('.attribution-info>.owner-name').text+'<br>Source: ' + document.documentURI+'<br>License ' + $('.photo-license-url').href + '</span></span>')

Take the resulting html, and paste into your web page next to the photo.


Jun 24, 2018 03:24

Field watches is where it's at

Posted by admin |


I recently pondered if it would be time to wear a watch again…

In practice the adventurers, aviators, divers and soldiers that rendered credibility to certain watches and designs have now all but migrated to digital watches and computers. But analog watches tend to look better on your wrist.

5372909422 0d7f2cc5ba b
Click to view full-size image…
Size: 184.2 kB

A Seiko military watch (Attribution) Author: Brandon Cripps

When it comes to analog watches, there is basically two styles:

  • Dress/impress watches. Watches made to be aestethically pleasing and/or containing advanced functionality of a mostly useless nature. Although this may sound like a bit of a letdown, all analog watches fall into this group really, it's just that some pretend not to.
  • And for the second group: Watches once made for professional use. These are watches that once were the best you could have to help you in your work, whether you were a diver, an aviator, astronaut, adventurer or car racer. Today, you can get a watch model that used to fulfill one of these roles, or something that is inspired by such watches.

Strictly speaking, there is one group of analog watches that stay relevant from e.g. a prepper perspective: Mechanical watches that can withstand strong electromagnetic pulses (EMPs) such as caused by nuclear explosions. Interestingly, many of the more advanced dress-to-impress watches fall into the EMP tolerant category. It might be that even electronic watches would escape at east some EMPs; it's hard to find good info on the Internet.

3116404826 2c6aa0a6a9 b
Click to view full-size image…
Size: 404.2 kB

A Luminox field watch

I started browsing through the offerings online and in stores. Soon it became to clear to me what I wanted from an analog wristwatch:

Quickly readable

Quickly readable — A readable watch face, that is a watch face that gives you the time with the least amount of attention needed to know the time. This means:

  • Readable in darkness — Glow in the dark markings or glow in the dark watch face
  • Arabic numerals — The markings should be numbers, otherwise I could just use a compass and the sun, thank you very much (slightly exaggerated)!
  • Uncluttered — No extra decorations such  as:
    • No outer ring with diver's markings
    • No complications (complications are extra dials)
    • No date indicator, I can get that from my phone more reliably


19309888151 26a1267776 z
Click to view full-size image…
Size: 131.2 kB
A very readable Laco "1925" (Attribution) Author: Daniel Zimmermann

Other requirements

Some other things crept in to make the watch practical for me.

  • A watch body made out of titanium
  • A battery operated quartz movement, preferrably solar so I do not need to change batteries
    • Mechanical watches on the other hand get mechanical problems and hence need maintenance
  • I'm not going to spend a fortune, the threshold being around $250
  • As I learnt more, and realized that analog is all for show, I actually softened a bit on the design side. The watch I finally purchased is perfectly readable, but a bit in a 1940s retro style. There is a picture of it near the end of this post.

Field watches, aviator watches and diving watches

It turned out that there is genre of watches that ticks most of the above criteria: Field watches. Field watches belong to a category of watches for people who need to get the time quickly and reliably under field conditions. In this category you can also find diver's watches which have a rotating bezel for keeping tabs on oxygen supply and aviators' watches which have an outer ring for, for, I'm not actually sure what that ring is for (update: It is a slide rule!)


3948376935 dd847ee351 b
Click to view full-size image…
Size: 549.4 kB

A Luminox watch with a rotating bezel traditionally used for diving


5519978030 3da8e0afdd b

A Luminox watch with three complications (extra dials) and date. The stopwatch dials could come in handy for racing.
That is if you did not know that digital watches exist, or if you just want to pay hommage to old time racing

Field watches on the other hand are more targeted to infantry men, who as a rule do not need to calculate oxygen remaining or a flight path so these watches tend to be no-nonsense. Many watches at least in the aviation and field genres tend to be retro-styled, and hark back design-wise to a time where analog watches made sense for professionals in these, ehrm, fields.

Diving watches tend to focus on minutes elapsed, which dictates a lot of the design of the watch, including a rotating bezel and very clear marking of minutes. One good thing with diving watches is that they work well in darkness, and that they take pains in communicating during such conditions that the watch is still working and in distingushing the hour and minutes hands even when overlapping. Still, diving watches are being replaced by computers. The more finely marked red part of a diving watch's bezel is for ascent to the surface, although computers can now do these calculations safer and with better precision.

Click to view full-size image…
Size: 38.2 kB

Speaking about emphasizing minutes, this Oris Regulateur der Meistertaucher has nothing but a minute hand on the big dial, no hour or seconds hands; you have to look at the small dials for those

Aviator's/Pilot's/Astronaut's watches cater for the other extreme, being up in the atmosphere or even above it. At lower speeds the minutes are emphasized, at jet speeds time zones become important and for astronauts there is a logarithmic bezel on e.g. the Omega Speedmaster professional. The bezel may be used as a slide rule for doing calculations on e.g. fuel consumption.

These guys, Bremont, know how to make gorgeous looking pilot inspired watches:

5923677732 18965418df b
Click to view full-size image…
Size: 472.1 kB

This one is called "P-51", no doubt named after the  US WWII fighter plane

Ironically, aviators still seem to use and appreciate analog watches, While infantry men and divers now rely on digital computers on their wrists, many aviators already have a big honking computer in the form of a glass cockpit in front of them. So having a feeble such on the wrist may not add much.

The specialized brands — and a couple of general ones

There at least four brands that specialize in affordable field watches, and a couple of general brands that have watches in this category. The four specialized ones I've found are:

Momentum and Bertucci are most commonly of titanium, while Luminox and Timex have few offerings here. There are some more specialized brands here that I found via Ebay such as watches from Swiss army knife brands and a brand called Messerschmitt.

11244234635 d2bdaf04b6 b
Click to view full-size image…
Size: 196.0 kB

A Timex field watch

I also found nice-looking affordable field watches from general watch brands such as:

  • Citizen
  • Seiko
  • Alba (Seiko)

Citizen has the very nice Eco drive movement, which seems to last for decades without ever changing the battery.

3249931880 ba87c59f63 z
Click to view full-size image…
Size: 92.5 kB

A Citizen titanium watch in field watch style (Attribution) Author: Brent C


A Momentum titanium field watch


Aviator's and astronaut's watches

The original astronaut's watch seems to be the Omega speedmaster professional. However the movement of the newly produced watches is not the same as in those that actually went to space.

1200px Omega Speedmaster Automatic (reduced)
Click to view full-size image…
Size: 126.6 kB

An Omega Speedmaster

Aviator's watches have several roots, in France, Switzerland, Brazil, Germany, Italy, the UK and USA. The German variety seems popular and you can find watches in that design style by including the word Flieger ("pilot" in German) in your searches.

A Flieger watch claimed to be from around 1941

Here is a nice series of articles on the history of the pilot watch. It turns out that the original pilot watch brand is Cartier, for Santos-Dumont maybe as early as 1906. It is a rectangular watch with roman numerals. The next step was the brand Zenith already in 1909 setting the look of a pilot watch that we still know today.

One cool thing with some of the pilot watches is that they have a slide rule bezel. Here's how to use a slide rule bezel on an aviator's watch:

Alternatives to Titanium

If you want to avoid nickel, a nifty way of being able to wear any watch, nickel or not, is to use what is called a bund strap. Bund straps were initially made for German pilots to thermally insulate the metal watch from the wrist of the pilot. A bund strap is wider than the watch under the watch body, and then tapers off into a normal strap.

3589589735 8f6fbfd3af b
Click to view full-size image…
Size: 315.7 kB

 Sinn pilot's watch with a matching Jürgens bund strap

Another brand for Bund straps besides Jürgens, is Fluco. If you want a strap that keeps the generous width all the way round, it's called a cuff strap. Beware that the metal parts of straps may well contain nickel though!

Another option is to wear a plastic watch, but make sure it does not actually have a stainless steel back plate. Plastic is sometimes referred to as "resin".

The German Damasko brand makes its own nickel-free steel. Another German brand, Sinn, may also be nickel free.

Reading Sinn's glossary, they point out that nickel may not necessarily be released even from a nickel containing steel based alloy:

The level of nickel release is not determined by the nickel content of a metal, rather by its corrosion resistance. Only through corrosion processes can nickel escape from a steel alloy in the form of ions or complexes. In highly corrosion-resistant steel, the nickel therefore remains stably bonded in the steel even if it has a relatively high nickel content.

What I actually bought

I had done my research quite thoroughly, and here comes the problem when you've done that: You are getting so good at finding what you want that the deal you find is likely to not be around for long… I've learnt this the hard way through years of scoping out and finally deciding on a piece of merchandise. But come on, one hour!

After having looked at many Bertucci watches I finally set my eyes on a Bertucci watch with a crimson red clock face. said they only had one watch left, and so said I pondered for an hour, and then I decided to pull the trigger.

Gone. From the face of the Internet. Could not find it anywhere. I decided to stay around for a week to see if it would get re-stocked anywhere. Nope.

So after a week I decided to go for my second best choice, a classic model with a yellow/khaki clock face. I found a vendor that actually delivered to Sweden: . I pulled the trigger and they charged me, bam! I got the last one, they were now out of it. Except, that three days later they sent me an e-mail that they never had it in the first place!

Was this a sign that I should buy something else or none at all? Eventually I ordered the same watch from Long Island watch:

Click to view full-size image…
Size: 71.0 kB

And here it is!
It's chunkier, bigger and more contemporary military than I thought, and the watch face is more khaki than yellow in daylight. But overall it looks really nice.
One reason it looks so contemporary military I guess is because the sand color scheme makes it look like a watch for desert-like environments where unfortunately a lot of action has been seen recently.


One thing to look out for is if the minute hand is unaligned with the minute markings. That is, as the seconds hand strikes twelve, the minute hand is right in between two minute markings.  You can see in the picture above that — compensating for the angle of the shot — the minute hand is pretty much aligned with a minute marking on the watch face. Unfortunately the seconds hand is straight down at this point in time.

This means that in practice the precision of the resolution of telling the time is about one minute.

It's easy to fix — you can adjust the precise alignment relationship between the seconds and minute hands with the crown: Just pull out the crown when the seconds hand hits twelve and then carefully turn the crown and make the minute hand align with the desired minutes marking. Then push the crown in to make the watch start to tick again. Now the minute hand will be aligned with a marking as the seconds hand strikes twelve.

Incidentally, getting the alignment correct was a huge boost in confidence in the watch! Such a simple thing to do with a big usability/trust payoff.

Image credits/links

Jun 22, 2018 12:55

How to change a video to have one still image and all keyframes & resize it

Posted by admin |

So I wanted to produce a very small video in size, where the imagery would be meaningless but the sound ok. I needed this for testing that it actually does what it should, that is to correctly analyze how offset in time video files are that are filming the same event. I also wanted all frames to be keyframes, but since it is analyzing sound, that may not have been needed actually.

Make a video only display a static image on every frame (but still have many frames)

ffmpeg -i invideo.mp4 -i still_image.png -filter_complex "[1][0]scale2ref[i][v];[v][i]overlay" -c:a copy out.mp4

Scale the size of the video:

ffmpeg -i invideo.mp4 -filter:v scale=10:-1 -c:a copy out.mp4

The above sets the height proportinally to the width in pixels

Make a video only have keyframes

-force_key_frames 'expr:gte(t,n)'

(I think this works, haven't verified)


Jun 20, 2018 07:55

It seems I've finally left Sublime for VS Code and Atom

Posted by admin |

I don't remember what it was now, but there was a piece of functionality I could get in VS Code and not in Sublime, and it made me switch. Recently I have been working with s-expressions so I have used Atom for that, since Atom has better integration of Parinfer than VS Code has (same guy doing the plugin for both).

Both Microsoft's VS Code and GitHub's Atom are built on top of Electron, which is basically a version of Google Chrome made to be an application platform.

Jun 17, 2018 11:08

Me talking at events the last month

Posted by admin |

Swedish Land Registry and Blockchain event June 11

Click to view full-size image…
Size: 904.5 kB

Click to view full-size image…

Bloxpo event in May ­— presentation of Chromapolis


Jun 14, 2018 01:09

Two step keyboard shortcuts are actually pretty nice

Posted by admin |

Summary: In the Atom editor, you can do ctrl+k and then another ctrl+character thingy, or jusr ctrl+k and another character. And that effectively triples the shortcuts and is kind of easy to do.

Edit 2018-06-05: This holds true for VS code too

I needed to use the Atom editor for its Lisp support (which VS code seems to lack, Edit 2018-06-05: VS code actually has parinfer too, Edit 2018-06-12 but it is inferior, maintained by the same guy & he focuses more on the Atom parinfer plugin) and I needed to uppercase some things, and there was no shortcut in the menu for it. I opened the shortcut setting and found that is reachable by

ctrl-k ctrl-u

It seems that ctrl-k works as a mode to put in a "subcommand" similar to screen where ctrl-a does that. It worked surpisingly well. However Atom does not list the shortcut next to the menu option, which kind of defeats or at least hampers the purpose.



May 23, 2018 04:20

Watermarking a video with ffmpeg

Posted by admin |

Centered overlay/watermark:

ffmpeg -i original-video.m4v -i watermark.png -filter_complex "overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2" watermarked-video.m4


May 17, 2018 05:26

Linux Ubuntu 18.04 screen cast software that worked: vokoscreen

Posted by admin |

Linux screen cast software that worked: vokoscreen (although sound had problems in the beginning & uncompressed capture did not work).
Didn't work: kazam (crashed computer, made orange into green).
Worked but no free area capture: gtk-recordmydesktop
All available via apt install on ubuntu 18.04LTS

May 15, 2018 12:15's strange UI devolvement

Posted by admin |

I do not know how big of an operation is, but it seems clear to me that they do not employ a front-end developer normally, but probably just takes one in for a couple hours per year.

A new look has been launched some time ago that has removed all possibilities to format text for meetups, and just today I noticed that if you post a long comment, it will simply say that your post is too long and ask you to try again.

It used to say, even after the UI remake,  that your comment is too long together with info on what is the max amount of characters. That has now been removed. I'm baffled as to why they do not pay more attention their UI.

Also now, you cannot see all participants of a meetup, if it is more than eight. Well, as an admin you can by clicking an obscure link. It's like things just fall by the wayside.

May 12, 2018 04:05

How I got OpenVPN to work on Ubuntu 18.04LTS after sleep/suspend

Posted by admin |

These are preliminary results, it seems to work.


Switch in the update-resolv-conf from here

and install openresolv

sudo apt install openresolv
  • reboot

The original update-resolv-conf distributed with the openvpn package in Ubuntu 18.04 did not work for me:

Or, it could possibly be that openresolv resolved the problem of update-resolv-conf not exiting cleanly. I haven't bothered yet to check which of these two changes made the difference, but I suspect it is update-resolv-conf.

Longer text

I could not get systemd to reliably start OpenVPN, especially not after sleep. Restarting OpenVPN after sleep, through systemd, made OpenVPN work every second time. Every odd time (including time number 1) it complained about the up and down scripts not exiting cleanly:

"WARNING: Failed running command (--up/--down): external program did not exit normally"

I resorted to starting the vpn from the command line, same problem, so systemd is not at fault here.

The new update-resolv-conf script I use has this at the end:

# Workaround / 
# force exit with no errors. Due to an apparent conflict with the Network Manager
# $RESOLVCONF sometimes exits with error code 6 even though it has performed the
# action correctly and OpenVPN shuts down.
exit 0

Who knows, maybe that is all that was needed?


May 10, 2018 04:35