Skip to main content

Ralsina.Me — Roberto Alsina's website

Agent of the Terran Empire (Flandry, #3)

Cover for Agent of the Terran Empire (Flandry, #3)

Review:

I had fond mem­o­ries of read­ing An­der­son and oth­er clas­sic Sci­Fi of the same vin­tage when I was a kid.

Well, that seems to be the right age. On one hand, a kid is apt to be car­ried away by the ad­ven­ture, which is fun, while al­so ig­nor­ing the mis­oginy, the ca­su­al chau­vin­is­m, the jin­go­is­m, the gen­er­al metaphor­i­cal racism and a whole lot of oth­er isms and in­ys which, as a grown up, re­al­ly dull the en­joy­ment of the ex­pe­ri­ence.

New minisite: book covers

Since I wrote tapi­ta to au­to­mat­i­cal­ly cre­ate book cov­er­s, it was ab­surd­ly easy to turn it in­to a site where you can cre­ate book cov­er­s.

So, you can go to Cov­er­s.ralsi­na.me and cre­ate book cov­er­s.

Fun part: this is the whole back­end for the site:

from json import loads
from tapita import Cover
from io import BytesIO
import base64


def handle(req):
    """handle a request to the function
    Args:
        req (str): request body

    {
        "title": "foo",
        "subtitle": "bar",
        "author": "bat",
    }
    """
    try:
        args = loads(req)
    except Exception:
        return "Bad Request", 400

    c = Cover(**args)
    byte_arr = BytesIO()
    c.image.save(byte_arr, format="JPEG")

    return (
        f'<img src="data:image/jpeg;base64, {base64.b64encode(byte_arr.getvalue()).decode("utf-8")}">',
        200,
        {"Content-Type": "text/html"},

New project: Tapita

For rea­sons I won't dis­cuss, I need­ed to cre­ate a bunch of ebook cov­er­s. Look­ing around I found some code to do it pro­gram­mat­i­cal­ly, so I adapt­ed/rewrote it and now pub­lished my ver­sion.

More in­for­ma­tion at the tapi­ta github re­po

And here's an ex­am­ple cov­er:

It does enough for what I need, but hap­py to work a bit more on it if any­one wants it.

Home Server Update May 2023

This is a longer-term up­date on the state of my home serv­er. You can read more about it in these 1 2 3 4 5 6 post­s.

Hardware

  • Got some SS­Ds for cheap, so mi­grat­ed it from HDDs to SDDs. Thanks to btrf­s, I could even do that with­out turn­ing the thing of­f.
  • Did some ex­per­i­ments to mea­sure pow­er us­age. It's around 8W when it goes full throt­tle with heavy disk us­age.
  • Work­ing on im­ple­ment­ing a UPS for the whole sys­tem.

Software

Since the last up­date I have added a few new ser­vices:

Filebrowser

I added a we­b-based file­brows­er. It's ... File­brows­er

Why? Be­cause some­times I need to man­age some files. No big deal, al­most nev­er use it.

Ebook Server

It's Kavi­ta and it's pret­ty good, if a lit­tle too ba­sic. I use it to man­age an epub col­lec­tion, and it work­s. Writ­ing scripts to au­to­mat­i­cal­ly tag and add meta­da­ta to ran­dom crap­py ebooks was fun.

Snips

A snip­pet/­paste­bin thing called snip­s.sh and it's re­al­ly nice. I added a small shell script so I can just pipe things to it. I am mak­ing the HTTPS pub­lic at snip­s.ralsi­na.me and keep­ing the SSH pri­vate in my VPN thank you very much.

Had some trou­ble mak­ing it work on ARM be­cause of a ten­sor­flow de­pen­den­cy, but it's run­ning fine.

WatchTower

Watch­tow­er is a tool that mon­i­tors your run­ning con­tain­ers and will dai­ly check if there are new ver­sion­s. If there are, it will up­grade them. Nice to have things up­date unat­tend­ed.

Conclusion

Serv­er is sta­ble

Columbus Was A Dope

Cover for Columbus Was A Dope

Review:

Not go­ing to make this long, since it's just a short sto­ry, but it's a nice com­bi­na­tion of re­al­ly out­dat­ed writ­ing and an ear for a kind of di­a­log that no hu­man ev­er used :-)


Contents © 2000-2024 Roberto Alsina