Lilla & Zoli Lock

Notes 2022

#TIL |  Force Refresh Android Chrome

Reloading a web page in Chrome on Android without letting the browser use it’s cache (hard reload, CTRL + F5 on desktop) isn’t that simple, if you want to avoid clearing your whole cache. But there is a workaround if the website is installable as PWA:

  1. Install it via the three dot menu in Chrome
  2. Long press on the icon in launcher
  3. Select “Website Settings”
  4. Tap on “Delete and Reset”
  5. Confirm the dialog “Do you really want to reset all local data…”

Last thing is the point: It doesn’t delete the PWA itself, but all data stored in the cache for it.

#TIL |  Photo Taking Impairment Effect

The memories of beautiful moments in life are one of the most valuable things a person can have. A wedding, a breathtaking landscape or whatever moments it may be that make you happy. In many such moments in my life I had a camera with me and often I had the feeling to “miss” something while taking pictures.

This morning I learned that this feeling has a scientific background and even a name: Photo-Taking Impairment Effect. This is an offloading process of the brain. It thinks to itself “Ah, he takes photos anyway, then I don’t have to store the memory in such detail.”

The question now is whether you can outsmart the brain by, for example, first looking at a beautiful landscape for an hour and soaking up the scenery and then taking a few photos, or whether you should first take a few photos and then sit down in peace and enjoy? If then, unfortunately, this doesn’t work for action-packed memories…

Continue reading ...

NPM Update Harakiri

Software developers are lazy people per se. The engine of an entire industry is laziness.

Naah, I don’t feel like writing my own code. I’ll take some random NPM package, even if it’s trivial functionality and only three lines of code.

Guys … take responsibility for your code! Copy as much as you want, but understand what the code does and make it your own!
I am so annoyed by misused frameworks and NPM update nightmares!

Morning Routine and IndieWeb

Get up. Make coffee. Grab Smartphone. Read news. Read RSS feeds. It goes like this or something similar every morning and I ALWAYS get stuck on the topic of IndieWeb. Surfing around for an hour or so. The topic simply hooked me. Today it was the wonderful work from Ryan Barrett (@snarfed.org@snarfed.org). Ended up thinking what I can do with …

https://granary.io/

#TIL |  Link NPM Module

Sometimes it is advisable to outsource functionality into seperate NPM modules. But to avoid having to run npm publish (module) and npm install (main project) every time a change in the module takes place, it’s relatively easy to include the module’s source code directly in the main project:

npm install /absolute/path/to/the/package

or to use npm link, which works with global symlinks, but does not save the dependency in package.json.

Continue reading ...

Node Dependency Madness

I did a long-awaited update from Hexo 6.0 to 6.3 today, after contributing a bugfix about a year ago and helping myself with adapting the node module directly in the meantime. To make sure I don’t have any legacy stuff, I deleted the node_modules folder and rebuilt it.

45 modules, 656 MB, 32,1815 files
to build a static blog with 1781 files

Sometimes I think how crazy and exaggerated this is with Node…

Wrap Wrap Wrapedi-Wrap

I’m working on a new generator for my #Hexo driven blog and there are plenty of images involved in the future, which I want to resize via Sharp and minify via Imgmin. At all, there will be about 10 to 15 lines of formatted code which will do the job. But … I did a very similar thing a while ago and now I have two demons sitting on my shoulder, debating wether or not to wrap the code in a single function:

Continue reading ...

New Notes Area

As a start for #POSSE, I’ve introduced a new area called ‘Notes’ on my blog, which replaces the TIL page. Still beta, because of some problems with #Hexo and currently it lacks of automation, regarding deployment and syndication, but I do need a few challenges.

https://kiko.io/notes

Continue reading ...

#TIL |  CSS's :where()

The :where() pseudo selector helps you writing cleaner code on the one hand. Instead of writing:

.wrapper h1,
.wrapper h2,
.wrapper h3 {
  color: red;
}

… you can do:

.wrapper :where(h1, h2, h3) {
  color red;
}

On the other hand, it is a so called forgiving selector, which rougly means, if one of the selectors in a selector list isn’t valid, it works nevertheless.

#TIL |  IIS: Allow Plus sign in Url's

Due to security reasons IIS only allows the + sign in query strings. But sometimes you may have an image file like landscape + night.jpg, which won’t be shown on your website.

The solution is, to allow unescaped plus signs in web.config and also do a rewrite to UrlDecode the requested Uri:

<configuration>
  <system.webServer>
    <security>
      <requestFiltering allowDoubleEscaping="True" />
    </security>
    <rewrite>
      <rules>
        <rule name="RewriteUserFriendlyURL1" stopProcessing="false">
          <match url="\+" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="{UrlDecode:{REQUEST_URI}}" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

Source