Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Urban 00:07 on 17 Aug. 2026 Permalink |  

    Eclipse 2026 

    I remember the 1999 eclipse – those were different times. Information was scarce (for a kid, at least) and equipment was hard to come by. I still tried though – equipped with my father’s Praktica camera, a 200mm lens and a DIY mylar filter, but I managed to miss the totality by a couple of kilometers.

    This year was the first time since 1999 that it happened in the continental Europe again.

    But, aptly for the current times, it also felt like an instant meal, with last minute orders of glasses and filters, last minute location scouting, and a resigned sense of “if we miss it, we miss it” that only comes with age.

    We went to Valencia (easy to travel and the family likes it), but it was close to the edge of the totality band and only got 1 minute of totality. What’s more, the sun was quite low in the sky, about 4.5°, so it would not be visible in most of the city. The official recommended location was at the Malvarrosa beach.

    Shademap showed poor conditions

    We had no desire to attend such organized mass events (about 10k people expected at Malvarrosa), so we found a location north, in Alboraya.

    Turns out we also had some luck with the clouds and caught the thing.

    The pics are mediocre, because of a youtube comment that said: there will be thousands of professional photos, so you should just watch… it’ll be over in a minute.

    Still, I had to. And I’m glad I did, because that’s the only way I can still actually believe that I was there and that this is what I saw 🙂

    A photoshop collage of the phases
     
  • Urban 22:51 on 8 Feb. 2023 Permalink |  

    Cisco AnyConnect with TouchID on MacOS 

    Quite annoying that AnyConnect doesn’t support TouchID on MacOS, so you need to type in your password every time. But there’s a fix:

    • AnyConnect also has a command-line version, the util is located in /opt/cisco/anyconnect/bin/vpn
    • It is interactive, so upon invoking you must enter your username and password
    • This can be done by piping the username and password to the vpn utility
    • To prevent having your password in plaintext, you can use the command-line password manager pass that saves secrets in encrypted GPG files: https://www.passwordstore.org/
    • However this means you now need to enter the GPG secret on every connect
    • To solve this, install and configure the pinentry-touchid utility that replaces the built-in CLI dialog and saves the secret in the Keychain https://jorgelbg.me/2021/08/introducing-pinentry-touchid/
    • Voila, now you can connect using TouchID

    The following helper script from Superuser1 is useful to easily control the vpn status:

    #!/bin/bash
    
    # Easily connect to Cisco AnyConnect VPN
    
    # Get first parameter
    COMMAND="$1"
    
    case $COMMAND in
        connect | CONNECT | c | C)
            printf "2\n${username}\n$(pass show my_password_entry)\n" | \
                /opt/cisco/anyconnect/bin/vpn -s connect remote_host_url
            ;;
    
        disconnect | DISCONNECT | d | D)
            /opt/cisco/anyconnect/bin/vpn disconnect
            ;;
    
        *)
            cat <<EOF
    Usage: vpnctl COMMAND
           connect | CONNECT | c | C    Connect to the VPN
           disconnect | DISCONNECT | d | D    Disconnect from the VPN
    EOF
            ;;
    esac

    1. https://superuser.com/a/1723439 []
     
  • Urban 21:48 on 28 Apr. 2020 Permalink |  

    Cassandra auto-expiring data 

    Just found a beautiful feature of Cassandra — a single update that:

    • performs an upsert (insert or update), so there’s no need to check for existing data
    • ensures items are unique — because we’re using a set { … }
    • and takes care of individual item expiration: each item is valid only 2 weeks, after that it is removed, and when there are no more items left,  the row is removed as well
    UPDATE covid_contact_tracing USING TTL 1209600 
    SET people_met = people_met + {'alice','charlie'}
    WHERE user = 'bob';

    Seems to behave exactly as expected:

    • If Bob meets Alice multiple times, each time Alice’s the TTL is reset to 2 weeks
    • After 2 weeks Alice indeed expires and is removed from the set
    • When all contacts expire, Bob is also removed

    There are drawbacks, however:

    • There’s no way to query a TTL of a collection (set/list/map) item — so you can never know how long it has to live. Or if it has a TTL set at all.
    • If you have existing items without TTL, they have to be reinserted with TTL; this means tons of writes, but at least the whole set can be reinserted at once.
    • This breaks idempotence of writes: you cannot have a job to replay writes (for example, from multiple sources to decrease probability of missing items), since this would reset the TTL
     
  • Urban 22:33 on 29 May. 2017 Permalink |  

    A tour of Menger sponge 

    Done as a WebGL shader. Runs much smoother than a comparable implementation in three.js

    Direct link to Shadertoy, in case the embed doesn’t work.

     

     

     
  • Urban 20:14 on 11 Jan. 2017 Permalink |  

    A glimpse of Sri Lanka 

    To my great surprise (and delight), one of my shots from Sri Lanka was published in the December 2016 issue of the National Geographic Slovenija magazine 🙂

    20161102-_MG_4980

    20170114-_MG_6489

    Below are some of my other favorite shots.

    20161029-IMG_3587b 20161029-IMG_3615b 20161029-IMG_3686 20161029-IMG_3833b 20161031-_MG_4160b  20161105-_MG_6066

    This was a serious photo tour (and an awesome group of enthusiasts), which means we were snapping like crazy. But I still have a long way to go 🙂 More photos.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel