Traefik V2.3 creates a file called acme.json after a successful certification-creation (cert-provider: let’s encrypt).
To extract the certificate and key from this file I have created this bash-script:
https://github.com/ugu5ma/extract_acme_json_traefik
Category: Uncategorized
Send Geo-location from Browser
Create a button and log the current LAT/LON when the button is pressed:
<button id="send-location"> Send location</button>
document.querySelector('#send-location').addEventListener('click', () => {
if (!navigator.geolocation) {
return alert ('Geolocation not supported by Browser !')
}
navigator.geolocation.getCurrentPosition((position) => {
console.log(position)
})
console.log output

Java: Remove brackets / leading slashes from String
My Android-app have always presented the DNS-Server(s) with brackets / leading slashes like:

How can we get rid of these unnecessary characters ?
String myIp2Dns1:
String myIp2Dns1 = String.valueOf (LinkProp.getDnsServers()) ;
Log:
Log.d("myDnsInfo - Domain - ", "Domain = " + LinkProp.getDomains());
D/myDnsInfo: dns = [/10.0.2.3]
Solution:
Manipulation of String myIp2Dns1:
myIp2Dns1 = myIp2Dns1.replaceAll("[\\[\\](){}\"^/+\"]","");
This command removes brackets / slashes / backslashes from the String.
The output looks much better now:

Home Assistant 2021.2.3 on Pi4 running Home Assistant OS: Fix Dyson add-on





Paste the following lines:
cd /usr/local/lib/python3.8/site-packages/libpurecool/
cd /usr/local/lib/python3.8/site-packages/libpurecool/
rm dyson.py
curl -O https://raw.githubusercontent.com/bfayers/libpurecool/auth_customdeps/libpurecool/dyson.py

Now the Dyson-Device is connected:



-Done!
You must be logged in to post a comment.