# Allgemein

## How to run one-off command in docker

If you want to just run a command on a docker image without permanently creating a container, run

docker run -it --rm [image] [command]

for example

docker run -it --rm node:latest npm --version

By using --rm we tell docker to immediately remove the container once the command has finished.

Posted by Uli Köhler in Allgemein

## Where to search for south Korean patents?

When browsing the site of the KIPO (south Korean intellectual property office), it’s a little hard to find where to find the Korean patents database – or, in other words, where to search for Korean patents.

Just follow our direct link to KIPRIS, the Korean patents database and enter the search term in the big search box on the middle of the page. For example, you can enter:

• English title
• Korean title
• Korean registration number
• Korean application number
• Inventor
• Company

etc.

Posted by Uli Köhler in Allgemein

## How to fix Nextcloud Can not validate phone numbers without default_phone_region being set in the config file

### Problem:

When running Nextcloud occ maintenance:repair you see an error message like

ERROR: Can not validate phone numbers without default_phone_region being set in the config file

### Solution:

Add the config option using

php occ config:system:set default_phone_region --type string --value="DE"

or, when using docker-compose:

docker-compose exec -u www-data nextcloud php occ config:system:set default_phone_region --type string --value="DE"

and run maintenance:repair again.

Posted by Uli Köhler in Allgemein

## What free audio transcription service works best for noisy audio?

We tested some free transcription services with a MP4 video with large amounts of background noise and a very badly recorded voice from a camera microphone.

We tested:

The best result was from amberscript.com which was much much better than the next best result from temi.

Further notes:

• We did not find out how to export the entire subtitle file from veed.io
• temi provides an interface where words that have not been recognized clearly are marked. This helps enormously when manually correcting transcriptions.
• freetranscriptions takes audio files as input, not video files
• amberscript took the longest of all tools to transcribe.
Posted by Uli Köhler in Allgemein

## Where can you find icons without attribution?

The following sites publish icons without attribution:

Posted by Uli Köhler in Allgemein

## What is the IPv6 address [2803:f800:50::6ca2:c2f1]?

2803:f800:50::6ca2:c2f1 is the Cloudflare DNS server raina.ns.cloudflare.com.

Posted by Uli Köhler in Allgemein

## How to download Wasabi/S3 object to file using boto3 in Python

You can use boto3’s download_fileobj() in order to download files from S3 to the local filesystem:

with open("myfile.txt", "wb") as outfile:


Note that the file needs to be opened in binary mode ("wb").

### Full example

import boto3

# Create connection to Wasabi / S3
s3 = boto3.resource('s3',
endpoint_url = 'https://s3.eu-central-1.wasabisys.com',
aws_access_key_id = 'MY_ACCESS_KEY',
aws_secret_access_key = 'MY_SECRET_KEY'
)

# Get bucket object
my_bucket = s3.Bucket('boto-test')

# Download remote object "myfile.txt" to local file "test.txt"


Don’t forget to fill in MY_ACCESS_KEY and MY_SECRET_KEY. Depending on what region and what S3-compatible service you use, you might need to use another endpoint URL instead of https://s3.eu-central-1.wasabisys.com.

Posted by Uli Köhler in Allgemein

## How to fix ‘need fortran-95+TR-15581/fortran-2003 compiler, not f77. Stop.’

### Problem:

While trying to compile a software, you see this error message:

makefile:252: *** need fortran-95+TR-15581/fortran-2003 compiler, not f77.  Stop.

### Solution:

Run

export FC=gfortran

then retry the command that caused the error (e.g. make)

Posted by Uli Köhler in Allgemein

## How to fix htpasswd cannot open file htpasswd for read/write access

### Problem:

You are trying to add/change a password in a htpasswd file using a command like

htpasswd auth.htpasswd myuser

but you see this error message:

htpasswd: cannot open file htpasswd for read/write access

### Solution:

htpasswd is trying to tell you that it got Permission denied when accessing the htpasswd file and hence can’t read it or it can’t write the file (auth.htpasswd in this example).

There are multiple ways to fix this:

1. Run htpasswd using sudo, e.g.
sudo htpasswd auth.htpasswd myuser
2. Fix the permissions of the file, e.g. using
sudo chown $USER auth.htpasswd chmod o+rw auth.htpasswd Note that this permanently modifies the permissions for the htpasswd file and hence might create additional security risks! 3. Use a different htpasswd file to which you have access. You need to change the configuration on your webserver etc (i.e. the software that is using the htpasswd file). This option isn’t always available – e.g. if you can’t change the webserver’s configuration, you just have the option of asking the system administrator nicely. Posted by Uli Köhler in Allgemein ## How to reset Yealink T46G to factory settings In order to reset your Yealink T46G to factory settings: 1. Turn on the phone and wait until it has booted up 2. Press the OK button until the phone asks you if you want to reset to factory settings 3. Confirm the factory reset by pressing OK (i.e. the button on the bottom right of the screen, i.e. the rightmost button of the row of buttons just below the screen) 4. Wait for the phone to reset Posted by Uli Köhler in Allgemein ## Random port number generator This port generator generates a random TCP/UDP port between 1024 and 65536 Your personal random port: Port Click here to generate a new random port number Posted by Uli Köhler in Allgemein ## How to install RabbitMQ on Ubuntu in 30 seconds #### Use our script: wget -qO- https://techoverflow.net/scripts/install-rabbitmq.sh | sudo bash /dev/stdin This will install RabbitMQ and its dependencies from the official deb repositories. #### Or do it manually: Copy and paste these command blocks into your Linux shell. You need to copy & paste one block at a time – you can paste the next block once the previous block is finished! sudo apt-get update -y sudo apt-get install apt-transport-https curl gnupg -y curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | sudo apt-key add -  sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF deb https://dl.bintray.com/rabbitmq-erlang/debian$(lsb_release -cs) erlang
deb https://dl.bintray.com/rabbitmq/debian \$(lsb_release -cs) main
EOF
sudo apt-get update -y
sudo apt-get install rabbitmq-server -y --fix-missing

Posted by Uli Köhler in Allgemein

## How to cleanup large gitlab prometheus/data in Omnibus/Docker setting

In many of my dockerized Gitlab instances, the prometheus/data folder was eating up multiple Gigabytes of hard drive space even though I was not using Prometheus at all.

In order to fix this, I first disabled Prometheus in the docker-compose.yml config using

prometheus_monitoring['enable'] = false


Also see How I reduced gitlab memory consumption in my docker-based setup for a detailed explanantion.

After that, you need to restart gitlab in order for the settings change to take effect.

Now you can just delete the Prometheus data folder. Make a backup of the entire gitlab data folder before this step.

Run this command from within your gitlab data folder:

rm -rf prometheus/data

Posted by Uli Köhler in Allgemein, Linux

## Cylinder volume calculator (from diameter & height)

Calculate the volume of a cylinder from its diameter and height using this online calculator – formula included.

TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button. Just make sure that all inputs are green by entering valid values.

m

m

$$V = \pi\cdot(\frac{d}{2})²\cdot h$$

Posted by Uli Köhler in Allgemein

## Bilirubin mg/dl to μmol/l converter

Convert Bilirubin from mg/dl to μmol/l using this online calculator – formula included.

Note about medical information:
This information is presented for informational purposes only and is intended for professionals. While we strive to provide accurate information, this information might be outdated, unintentionally misleading or incorrect. Consult a medical professional and/or read the primary sources cited in our article before basing any decision on this information.
TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button. Just make sure that all inputs are green by entering valid values.

mg/dl

$$n[mol] = \frac{m[g]}{M_m[\frac{g}{mol}]}$$

Posted by Uli Köhler in Allgemein

## Accessory cord tensile strength calculator (EN 564)

Calculate the tensile strength of accessory cords according to EN564 using this online calculator – formula included.

TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button. Just make sure that all inputs are green by entering valid values.

mm

$$F_{\text{tensile,min}}[N] = 0.20\frac{\text{kN}}{\text{mm²}} \cdot \text{D[mm]}²$$
Posted by Uli Köhler in Allgemein

## Sense resistor / current shunt + current sense amplifier calculator

Calculate the output voltage of a current sense amplifier combined with a current shunt resistor – formula included.

TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button. Just make sure that all inputs are green by entering valid values.

Don’t need a current sense amplifier? See our Sense resistor / current shunt calculator.

This calculator allows you to find out which sense resistor and current sense amplifier you need to use to obtain a specific amplifier output voltage at a specific current.

A

V

V/V

$$R_{\text{sense}} = \frac{U_{\text{drop}}}{I_{\text{sense}} \cdot G_{\text{current sense amplifier}}}$$ $$U_{\text{sense,drop}} = I_{\text{sense}} \cdot R_{\text{sense}}$$ $$P_{\text{sense}} = {I_{\text{sense}}}^2 \cdot R_{\text{sense}}$$
Posted by Uli Köhler in Allgemein

## Sense resistor / current shunt calculator

TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button. Just make sure that all inputs are green by entering valid values.

Too much power dissipation? You need to use a current sense amplifier ! See our Sense resistor / current shunt + current sense amplifier calculator !

Know the value of your sense resistor already? Use our Sense resistor power dissipation calculator

This calculator allows you to find out which sense resistor you need to drop a specified voltage at a given current. Additionally it computes the power dissipated in the sense resistor.

A

V

$$R_{\text{sense}} = \frac{U_{\text{drop}}}{I_{\text{sense}}}$$ $$P_{\text{sense}} = I_{\text{sense}}² \cdot R_{\text{sense}}$$
Posted by Uli Köhler in Allgemein

## Relay lifetime online calculator

TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button. Just make sure that all inputs are green by entering valid values.

Note: A cycle is typically defined as switching the relay on and switching it off again, i.e. one cycle consists of two switch actions (on + off).

### In case you know how many seconds between cycles:

s

cycles

$$N_{\text{predicted}} = N_{\text{nominal}} \cdot \text{Seconds between cycles}$$

### In case you know how many relay cycles per second:

Hz

cycles

$$N_{\text{predicted}} = \frac{N_{\text{nominal}}}{\text{Cycles per second}}$$
Posted by Uli Köhler in Allgemein

## Go HTTP Server minimal example

package main

import (
"fmt"
"log"
"net/http"
)

func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello world!")
})

// log.Fatal shows you if there is an error like the
//  port already being used
log.Fatal(http.ListenAndServe(":8080", nil))
}


Save this file as Main.go in a directory called GoHTTPServer, run go build && ./GoHTTPServer. Then, open http://localhost:8080 in your browser and see the result for yourself.

Posted by Uli Köhler in Allgemein