Monthly Shaarli

All links of one month in a single page.

February, 2024

WireHole: a combination of WireGuard, Pi-hole, and Unbound in a docker-compose project
thumbnail

WireHole is a combination of WireGuard, Pi-hole, and Unbound in a docker-compose project with the intent of enabling users to quickly and easily create a personally managed full or split-tunnel WireGuard VPN with ad blocking capabilities thanks to Pi-hole, and DNS caching, additional privacy options, and upstream providers via Unbound.

Interesting... Via Awesome Wireguard.

Everyday Estimation | NIST
DECADE – DistributEd Chemicals And fuels production from CO2 in photoelectrocatalytic DEvices

An EU Horizon 2020 project, grant ID 862030. Coordinated out of Messina University, Italy.

Solar-to-fuel direct conversion devices are a key component to realize a full transition to a renewable-energy based chemistry and energy, but their limits and possibilities are still under large debate. In this review article, we focus on the current density as a fundamental figure of merit to analyse these aspects and to compare different device configurations and types of solar fuels produced from small molecules such as H2O, CO2 and N2. Devices with physical separation of the anodic and cathodic zones, photoelectrochemical-type (PEC) or with a photovoltaic element integrated in an electrochemical cell (PV/EC), are analysed. The physico-chemical mechanisms involved in device operation that affect the current density and relations with device architecture are first discussed. Aspects relevant to device design in relation to practical use are also commented on. Then discussion is moved towards the relevance of these aspects to compare the behaviour in the state-of-the-art of the conversion of these small molecules, with focus on solar fuels from H2O, CO2 and N2 conversion, highligthing the gaps and perspectives of such technologies. The still significant lack of crucial data, notwithstanding the extensive literature on the topic, has to be remarked on, particularly in terms of the need to operate these cells in conjunction with sun concentration (in the 50–100 sun range) which emerges as the necessary direction from this analysis, with consequent aspects in terms of cell and materials design to operate in these conditions. The work provides a guide for the optimisation of the investigated technology and the fixing of their practical limits for large-scale applications.

The DECADE project proposes a new photoelectrocatalytic (PEC) approach for the conversion of CO2 avoiding water oxidation as an anodic reaction to overcome the current limits in the PEC system and to maximize effective energy utilization.
The project partnership has a strong industrial character but comprises top-level scientists in the area and international collaboration with Japan to allow the best possible benchmarking for the novel approach developed.

A simple logger of Ansible role git state

With frequent changes to my Ansible roles it often becomes tricky to keep track of which version of a particular role was executed for a particular play.

This is not thoroughly tested yet, but my approach is simple: each role contains a task that writes its git repo state (a git log formatted one-liner containing last commit hash, date, author, etc.).
These tasks are set to write to a log-file per inventory host, which is for two reasons: to avoid drowning in the default log file defined by log_path in ansible.cfg, and because log_path cannot be overridden by a play or role.

This results in a log-file (one per inventory host) looking something like this:

Started playbook execution at 2024-02-22 12:34:32.327042
Role 'locales' last commit caa6355 2024-02-21 23:38:31 +0100 by solarchemist
Role 'digikam' last commit 16f0643 2024-02-21 22:50:49 +0100 by solarchemist
Playbook 'workstation' last commit 4775cf7 2024-02-20 22:53:56 +0100 by solarchemist
Ended playbook execution at 2024-02-22 12:34:55.913856

My implementation illustrated in code below.

In a role:

- name: Log the last commit and git repo status to playbook log-file
  local_action: >
    shell git -C {{ role_path }} log
    --pretty="Role '{{ role_name }}' last commit %h %ci by %cn" -1 >>
    logbook-{{ inventory_hostname }}.log
  args: { chdir: "{{ playbook_dir }}" }
  become: true
  become_user: "{{ local_user }}"

In the playbook:

  vars:
     local_user: "{{ lookup('env', 'USER') }}"

  pre_tasks:
    - name: Write a start message to the playbook log
      ansible.builtin.shell: >
        printf "\nStarted playbook execution at {{ now() }}\n" >> logbook-{{ inventory_hostname }}.log
      run_once: true
      delegate_to: localhost
      args: { chdir: "{{ playbook_dir }}" }
      become: true
      become_user: "{{ local_user }}"
      changed_when: true
      tags: always

  tasks: [...]

  post_tasks:
    - name: Log the current commit of this playbook
      local_action: >
        shell git log
        --pretty="Playbook '{{ playbook_dir | basename }}' last commit %h %ci by %cn" -1
        >> logbook-{{ inventory_hostname }}.log
      args: { chdir: "{{ playbook_dir }}" }
      become: true
      become_user: "{{ local_user }}"
      tags: always
    - name: Write an end message to the playbook log
      ansible.builtin.shell: >
        echo "Ended playbook execution at {{ now() }}" >> logbook-{{ inventory_hostname }}.log
      run_once: true
      delegate_to: localhost
      args: { chdir: "{{ playbook_dir }}" }
      become: true
      become_user: "{{ local_user }}"
      changed_when: true
      tags: always
SOP4CV - Standard Operating Procedures for Cyclic Voltammetry

A valuable resource for any electrochemists out there, or for anyone using electrochemical methods (in particular cyclic voltammetry). Written by a former grad student and shared freely on the web, a commendable effort. As long as you tune out the blatant alcoholism in page footers.

Home-made dye-sensitized solar cells

https://www.berrycells.com/how-to-make-a-berry-cell

According to professor Michael Grätzel the best "berry" to use for this kind of demonstrator cells is hibiscus tea (known as karkadè in Arabic).

ReproHack Hub
thumbnail

ReproHack is a sandbox environment for practicing research reproducibility-

Why have I not heard about this before!
I should consider submitting my own paper to their general list of papers.

Hos Stena i Halmstad återvinns gamla elbilsbatterier
thumbnail

Ännu så länge sker ingen utvinning av de enskilda metallerna på denna anläggning, utan uttjänta batterier kontrolleras, kortsluts och monteras isär innan de individuella modulerna mals ner, krossas, skiktas, silas, skakas och sorteras efter densitet.

Arkiverad artikel (wallabag).

University alliances and the like
No simple way to search CRAN packages by author

Is there a website or R function that can help us answer the question "has this particular person authored any CRAN packages"? Turns out, no.

This question was asked a decade ago on StackOverflow, and for a while the p_search_any() function of the pacman package seems to have done the job. But since at least 2018 this function no longer works (likely because CRAN changed its website HTML).
It is unfortunate that the pacman documentation still describes this function, which I imagine might confuse any would-be users.

CRAN does list all package maintainers in a simple (but quite large) HTML table, but that is not the same as authors.

The more modern pkgsearch package does not offer any way to search by authors, as far as I can tell.

I am not sure whether other repositories (TeXLive, for example) offer a simple way to search by authors. But as demonstrated by pacman this is doable via web scraping, but as scraping is inherently fragile ideally CRAN should offer the data in some structured format (JSON, XML, whatever). If we are wishing for stuff anyway, I would also like to add that it would be awesome to search not just using name but also ORCID.