Category Archives: Software

Multisite WordPress user management is a pain

I installed the “Network Subsite User Registration” plugin which gives an extra menu point at each dashboard under Users>Registration>allowed There is, however, a glitch as wp-activate.php redirects to the main site in “signup-welcome” and “lead-in” sections that need to be commented out.

After all, I changed to “Profile Builder“, but it had its own problems, missing functions, large overhead, $$$ for extras and strange formatting instead of using the theme definitions.

Finally, I ended up with https://userswp.io , a lightweight user profile plugin that features front end user directory, a registration and a login form. The only modification here is another line in my child theme to suppress the WordPress admin bar.

#wpadminbar { display:none !important;}

 

CC-BY-NC Science Surf , accessed 24.08.2026

How to interpret an odds ratio of less than 1

In a recent paper (see page 122 ) I have read that an odds ratio OR of 0.7 means a 30% risk reduction which is wrong.

The OR is a measure of association not a risk ratio (which requires random sampling of the population and a slightly different formula).

Let’s have a look on the following table to see why this is all wrong

Disease+Disease-
Exposure+a=7b=10
Exposure-c=10d=10

The odds of an event is the number of those who experience the event divided by the number of those who do not.

Comparing the odds in an exposed and a not exposed group results in the simple odds ratio OR formula.

OR = (a/b) / (c/d)

But the odds is not the risk. The risk (incidence proportion) of an event is the number who experience it divided by everyone in that group – those who do and those who do not.

Risk for the exposed is 42.7%, for the unexposed 50%.


RR = ( a/(a+b) / c/c+b) )

Note the denominators: for the odds it was b and d (only the disease-free), for the risk it is the whole row (a+b and c+d). That single change is the whole difference between the two measures.

The risk ratio is then RR= 0.82 and the risk reduction 18%.

 

CC-BY-NC Science Surf , accessed 24.08.2026

Test before redirect

I need to test if a ssl server is likely to respond before doing any forward as I would otherwise “loose” a projection screen.
As the server uses only a self-signed certificate, basically all javascript tricks (iframe on the fly, jsonp, …) failed either due to Cross-Origin Resource Sharing (CORS) rules. Even after switching to php the first two methods failed (get header, fsockets) while I finally ended with a simple curl request

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://localhost:8443');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
if (curl_error($ch)[0]=="") header('Location: https://localhost:8443');

 

CC-BY-NC Science Surf , accessed 24.08.2026

The best videoconferencing system (even running on a Synology box)

There are many $$$ systems. But there are also super nice systems like Big Blue Button, Apache Open Meeting and Jitsi that are working equally well if you stick to Chrome or Firefox.

I recommend Spreed WebRTC audio/video call and conferencing server. Just run

docker pull spreed/webrtc
docker run --rm --name my-spreed-webrtc -p 8080:8080 -p 8443:8443 \
-v `pwd`:/srv/extra -i -t spreed/webrtc

and you are done. The only issue – how to route your local IP to the docker container?

sudo route -n add -net 0.0.0.0/16  146.x.x.x
sudo route -n delete 0.0.0.0/16  146.x.x.x

In the meantime, I managed to get it also on the Synology DS418play but only with a manual installation using the DS216+ ii docker binary according to some helpful comments on the synology forum.

Firefox 66 runs microphone, webcam and screen sharing without any problem, Chrome 73 needs a plugin for screen sharing.

 

 

 

CC-BY-NC Science Surf , accessed 24.08.2026

How to mount your Synology NAS under OSX High Sierra

Add NAS

sudo nano /etc/auto_master
#
# Automounter master map
#
+auto_master		# Use directory service
/net			-hosts		-nobrowse,hidefromfinder,nosuid
/home			auto_home	-nobrowse,hidefromfinder
/Network/Servers	-fstab
/-			-static
/mnt/NAS		auto_nas

Add mount point

sudo nano /etc/auto_nas
Lightroom -fstype=afp afp://username:password@bilder.local/Lightroom

Start

wakeonlan 00:11:32:xx:xx:xx
sleep 30
read -p "Press Enter to continue" </dev/tty
sudo automount -vc
exec sleep 1

Stop

diskutil unmount /mnt/NAS//Lightroom
ssh admin@bilder.local 'sudo shutdown -h now'
exec sleep 1

Stop without password entry

sshpass -p 'password' ssh admin@bilder.local sudo -S <<< 'password' shutdown -h now

 

CC-BY-NC Science Surf , accessed 24.08.2026

Corrupted file list in Next Cloud

This seems to happen for whatever reasons – the server file list is not in sync with the local file list and cannot even be modified manually. This may be a particular problem when you are at 1&1 /ionos with a hosted package. Here is a solution

$path = realpath(dirname(__FILE__));
#exec("php $path/console.php upgrade 2>&1", $out, $result);
exec("php $path/console.php files:scan --all -v 2>&1", $out, $result);
echo "<pre>result: " .$result .PHP_EOL;
print_r($out);

 

CC-BY-NC Science Surf , accessed 24.08.2026

Bundestag Videos in WordPress einbauen

WordPress verbietet aus Sicherheitsgründen das Einfügen von Javascript. Ich habe die Bundestagsverwaltung angeschrieben, ob sie nicht ähnlich wie Youtube einen Embed Code mit Iframe anbieten könnte, denn bisher bekommt man lediglich

<script id="tv6995628" src="https://webtv.bundestag.de/player/macros/bttv/hls/player.js?content=6995628&phi=default">
<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>
</script>

Natürlich könnten man in wp-config.php die Zeile define( ‘CUSTOM_TAGS’, true ); einfügen. Besser scheint mir aber, bis auf weiteres das Code Embed Plugin zu installieren und ein Custom Field für den Video Code anzulegen.

Das Ergebnis sieht dann so aus:

{{CODE1}}

Das ist aber auch nur so lange sicher, als der Bundestag nicht wieder gehackt wird.

 

CC-BY-NC Science Surf , accessed 24.08.2026

What is principle component analysis?

There is a wonderful description at stats.stackexchange.com how science should be taught

Imagine a big family dinner, where everybody starts asking you about PCA. First you explain it to your great-grandmother; then to you grandmother; then to your mother; then to your spouse; finally, to your daughter (who is a mathematician). Each time the next person is less of a layman. Here is how the conversation might go

This science not by some older science journalists or some younger science slammers but a real expert.

 

CC-BY-NC Science Surf , accessed 24.08.2026

Getting started with webRTC

While the protocol is already around for some time, webRTC isn’t been used so much although many browser are supporting it.

The basic webRTC samples of peer connection works well within the same browser window (showcase) while I need to connect sound + audio between two browser windows in a local network. After trying out several frameworks, I found the most easiest one easyRTCrtc. It works out of the box

git clone https://github.com/priologic/easyrtc.git
cd /Users/wjst/Desktop/easyrtc
cd /Users/wjst/Desktop/easyrtc/server_example
npm install express --save
node server.js

while pointing the browser to localhost:8080. Three weeks later, I find the sources poorly documented, connections are frequently broken, while Chrome explains it is moving soon to “Plan B”.

I could have been warned.

Will test now Ant Media Server.

 

CC-BY-NC Science Surf , accessed 24.08.2026

Pages and Endnote

Just found a plugin from Apple that allows Endnote citations in Pages. So Apple is also interested in the science industry :-)

Just in case you arrive here from Google by trying to reformat footnotes as endnotes. Your cursor needs to be on an existing footnote, only then the formatting menu appears top right.

 

CC-BY-NC Science Surf , accessed 24.08.2026

A mistake in the operating room

Found at https://www.nature.com/articles/ncpuro0294#article-info via https://twitter.com/MaartenvSmeden/status/1071138625415458817

A mistake in the operating room can threaten the life of one patient; a mistake in statistical analysis or interpretation can lead to hundreds of early deaths. So it is perhaps odd that, while we allow a doctor to conduct surgery only after years of training, we give SPSS® (SPSS, Chicago, IL) to almost anyone. Moreover, whilst only a surgeon would comment on surgical technique, it seems that anybody, regardless of statistical training, feels confident about commenting on statis- tical data. If we are to bring the vast efforts of research to fruition, and truly practice evidence- based medicine, we must learn to interpret the results of randomized trials appropriately.

 

CC-BY-NC Science Surf , accessed 24.08.2026