583 private links
Best way to write and share your knowledge in markdown.
Pretty neat!
You do not need to master every aspect of git to make use of it in your daily work.
Even a little bit of git will take you a long way towards best practice with regards to reproducibility!
Enjoy these videos
- https://youtu.be/s3JldKoA0zw (science setting, also awesome soundtrack!)
- https://www.youtube.com/watch?v=CvbLVVRzJF8 (business setting)
more links
- The missing semester of your CS education, online classes on the command-line, Git, the shell and more from MIT
- Git Magic, by Ben Lynn
- Become a Git pro in just one blog. A thorough guide to Git architecture and command line interface, by Uday Hiwarale
- How To Make Life Easier When Using Git, by Shane Hudson
- Confusing git terminology, Julia Evans, 2023-11-01
- How to be a 'good' git evangelist?, by Sunniva Indrehus, 2021-09-02
- Git en välskriven guide på svenska från IT-institutionen vid Uppsala universitet
- Scandinavia nordic-rse.org
- Australia/New Zealand rse-aunz.github.io
- Belgium: be-rse.org
- Germany: de-rse.org
- Netherlands: nl-rse.org
- UK: society-rse.org
- USA: us-rse.org
Via Github.
- FAIR principles for Research Software, released in May 2022 as an endorsed recommendation of the Research Data Alliance
- FAIR software checklist - if you are a researcher who writes software, check it out! Via Netherlands e-Science Center
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.
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
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).
- https://en.wikipedia.org/wiki/Hibiscus_tea
- https://en.wikipedia.org/wiki/Roselle_(plant) Hibiscus sabdariffa
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.
Ä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.
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.
- ENLIGHT European University Alliance, ten research-intensive universities (including Uppsala University). Site has RSS and Atom feeds.
- Arqus European University Alliance, Granada, Graz, Leipzig, Lyon 1, Maynooth, Minho, Padua, Vilnius and Wroclaw. Site has newsletter, but no visible RSS feeds.
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.
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.
Hitta aktiviteter med koppling till teknik och naturvetenskap med Ingenjörsvetenskapsakademins STEM-karta som ger förslag på mer än 300 aktiviteter för unga mellan 10 och 19 år.
[...] announcement at the G20 Virtual Leader’s Summit by Prime Minister of India, Narenda Modi, of the creation of a global repository for digital public infrastructure (GDPIR) [...]
Over >1300 public domain movies, tracked in #wikidata and hosted by Commons, #internetarchive (and even YouTube), watchable from a bespoke interface.
https://wikis.world/@magnusmanske/111743082678277750
What a cool project! This could make public domain movies much more accessible for all kinds of users.
Learn more on the WikiFlix Help page.
This is an extension of the very common find ... -exec grep ... {} \;
construct I use almost daily to find which files contain a particular text string.
Now, let's say you're looking for files in all your Ansible roles containing the string ppa:
, because you want to create a new role using a suitable existing role as a template. In this case, I think most recently modified is an excellent proxy for suitability.
Thus, the challenge: can we tack on something to the find ... grep
construct such that the output shows matching files in order of most recently modified?
taha@asks2:~
$ cd /media/bay/taha/projects/ansible && find . -not -path '*/legacy/*' -type f -name "*.yml" -exec grep -il "ppa:" {} \; -printf "%T+ %p\n" | grep -v "^\\./.*" | sort && cd $OLDPWD
2021-06-09+22:27:20.6889730070 ./roles/public/php-versions/tasks/setup-Debian.yml
2022-01-09+07:39:51.1836426130 ./roles/public/java-openjdk/tasks/ppa.yml
2022-02-23+15:33:13.2318546100 ./roles/dev/deluge/tasks/install.yml
2022-03-31+04:42:16.5644336650 ./roles/dev/editor-notepadqq/tasks/main.yml
2022-05-09+15:21:01.7974094830 ./roles/dev/qownnotes/tasks/main.yml
2022-06-25+02:46:13.0580097480 ./playbooks/workstation/roles/boot-grub/tasks/main.yml
2022-06-25+02:46:18.2940273650 ./roles/dev/libreoffice/tasks/main.yml
2022-07-03+00:16:44.5563131800 ./roles/dev/shutter/tasks/main.yml
2022-07-04+20:35:15.6128270470 ./roles/dev/magnus/tasks/main.yml
2022-07-14+21:09:01.6502524570 ./roles/dev/flatpak-remote/tasks/main.yml
2022-07-14+22:05:43.3325667290 ./roles/public/firejail/tasks/install.yml
2022-07-16+13:42:04.3756138100 ./roles/public/variety/tasks/main.yml
2022-07-16+22:05:52.0552035060 ./roles/public/browser-chromium/tasks/install.yml
2022-07-21+00:14:51.1137716920 ./roles/public/foliate-ebookreader/tasks/ppa.yml
2022-07-21+03:07:42.2876610030 ./roles/public/graphics-driver-nvidia/tasks/install.yml
2022-07-21+06:05:27.4514643180 ./roles/public/foliate-ebookreader/tasks/flatpak.yml
2022-07-23+18:32:46.8466638700 ./roles/dev/handbrake/tasks/main.yml
2022-08-12+00:09:51.6575729520 ./roles/dev/x2goclient/tasks/main.yml
2022-08-19+15:28:49.5605481840 ./roles/dev/x2goserver/tasks/main.yml
2022-11-04+11:35:14.6208169990 ./roles/public/python3/tasks/python-ppa.yml
2022-11-19+03:16:16.7832183030 ./roles/public/browser-firefox/tasks/main.yml
2022-12-24+23:04:01.2033026010 ./roles/public/R/tasks/dependencies.yml
2022-12-31+19:38:32.9105553030 ./roles/public/digikam/tasks/install-ppa.yml
2023-01-01+01:39:08.2045090970 ./roles/public/digikam/tasks/install-appimage.yml
2023-01-14+00:44:34.8526187360 ./roles/public/java-openjdk/defaults/main.yml
2023-01-26+14:10:18.9247087870 ./roles/public/ansible/tasks/main.yml
2023-01-26+16:14:59.9903243110 ./roles/public/sioyek-pdf/defaults/main.yml
2023-05-12+12:01:30.4705549280 ./roles/public/mpv/tasks/install.yml
2023-05-13+00:47:41.1561557100 ./roles/public/nextcloud-desktop/tasks/main.yml
2023-08-27+18:19:44.8291334420 ./roles/public/digikam/defaults/main.yml
Eureka!
Explainer
- the initial
cd <path-parent>
ensure that the resulting paths displayed byfind
don't contain the<path-parent>
part (to avoid cluttering the output), and the finalcd $OLDPWD
just make sure that the bash prompt is not changed to<path-parent>
. - unless you want to exclude some path from the search, there is obviously no need for
-not -path '*/<some-path>/*'
. grep -i
for case insensitive matching, and-l
(that's the letterl
for list) makesgrep
print only the filename and not each matching line (this is crucial for this hack to work, we wantgrep
to produce as little output as possible, in fact, if I could figure out a way to silencegrep
altogether I would have, but I couldn't).-printf "%T+ %p\n"
adds the filemtime
to the output (on a new line). Thanks angus@Unix.SE.
At this point, an example of the unfinished product is order. Before sorting, and before the final grep -v
, the output looks like this (excerpt):
taha@asks2:~
$ cd /media/bay/taha/projects/ansible && find . -not -path '*/legacy/*' -type f -name "*.yml" -exec grep -il "ppa:" {} \; -printf "%T+ %p\n" && cd $OLDPWD
./roles/public/java-openjdk/defaults/main.yml
2023-01-14+00:44:34.8526187360 ./roles/public/java-openjdk/defaults/main.yml
./roles/public/java-openjdk/tasks/ppa.yml
2022-01-09+07:39:51.1836426130 ./roles/public/java-openjdk/tasks/ppa.yml
./roles/public/browser-firefox/tasks/main.yml
2022-11-19+03:16:16.7832183030 ./roles/public/browser-firefox/tasks/main.yml
./roles/public/R/tasks/dependencies.yml
2022-12-24+23:04:01.2033026010 ./roles/public/R/tasks/dependencies.yml
./roles/public/browser-chromium/tasks/install.yml
2022-07-16+22:05:52.0552035060 ./roles/public/browser-chromium/tasks/install.yml
./roles/dev/x2goclient/tasks/main.yml
2022-08-12+00:09:51.6575729520 ./roles/dev/x2goclient/tasks/main.yml
with the grep
output on its own line, followed by the time-stamped output of printf
. Like I said, it would have been better if we could somehow silence the grep
output at this point. If you know a way, feel free to let me know!
As expected, sorting resulted in the non-time-stamped lines dangling about like some unwanted appendage:
taha@asks2:~
$ cd /media/bay/taha/projects/ansible && find . -not -path '*/legacy/*' -type f -name "*.yml" -exec grep -il "ppa:" {} \; -printf "%T+ %p\n" && cd $OLDPWD
2022-01-09+07:39:51.1836426130 ./roles/public/java-openjdk/tasks/ppa.yml
2022-07-16+22:05:52.0552035060 ./roles/public/browser-chromium/tasks/install.yml
2022-08-12+00:09:51.6575729520 ./roles/dev/x2goclient/tasks/main.yml
2022-11-19+03:16:16.7832183030 ./roles/public/browser-firefox/tasks/main.yml
2022-12-24+23:04:01.2033026010 ./roles/public/R/tasks/dependencies.yml
2023-01-14+00:44:34.8526187360 ./roles/public/java-openjdk/defaults/main.yml
./roles/public/java-openjdk/tasks/ppa.yml
./roles/public/browser-chromium/tasks/install.yml
./roles/dev/x2goclient/tasks/main.yml
./roles/public/browser-firefox/tasks/main.yml
./roles/public/R/tasks/dependencies.yml
./roles/public/java-openjdk/defaults/main.yml
At this point I was out of ideas, so grep -v ...
it was, and we end up with the one-liner shown above. It's an ugly hack, but hey, it works :-)
Bash 5.1 on Ubuntu 22.04.3, with GNU find 4.8.0, GNU grep 3.7, and GNU sort 8.32.
Energisystemet är alltid i balans. Det betyder att den tillförda energin alltid är lika stor som den använda energin, inklusive förluster.
Via Energimyndigheten.
[...] Reddit cut off public access to Pushshift this summer, so Redditmap.social can only use data generated early this year.
From the blog post "How Big is YouTube?" by Ethan Zuckerman.
It really is time to learn to use a more open platform, preferably a Fediverse-compatible one.
Thanks mnalis for posting the fix on the Github issue thread. I had spent time fruitlessly trying the Nextcloud app settings, permissions settings, and other stuff, but nothing had any effect - auto upload would not trigger.
Under Android Settings / User & accounts / Nextcloud / Sync
the options File sync
was OFF
! I toggled it ON
and the thing started uploading photos immediately.