More precisely, it is a matter of converting EPSG:23700 (EOV) format to WGS 84
After some research, I found that the easiest, and most easily scriptable way to do this is using PROJ
Installation (on Ubuntu, but there are many other options):
apt install proj-bin
Convert EOV to GPS:
$ echo 651804.2509374797 237667.6262724590 | cs2cs -f "%.10f" EPSG:23700 EPSG:4326
47.4829506012 19.0713855051 0.0000000000
For activate e-mail service in Google Business Suite, you need to set @
or empty string in “Host record” field of an MX record of your domain.
However, you cannot set either, you get validation error from CPanel.
Solution: enter domain name and a dot (.
), e.g. domain.net.
into host record field (see this answer on CPanel forum).
Jekyll, here we are.
Jekyll allows information to be stored in a simpler format that is easier to work with. Markdown is certainly much better for this than Wordpress posts. There are basically two layers to the solution: the document format (markdown) and the blog engine (Jekyll).
Markdown meets the basic requirements for document formatting (headings, paragraphs, numbering, bullets, images, links) and “there is a way forward” to more sophisticated formats, be it Word, HTML, LaTex, PDF.
In Wordpress: Tools > Export > All content > Download Export File
From command prompt (don’t need to install anything, except node >=12.14):
npx wordpress-export-to-markdown --post-folders=false --prefix-date=true export.xml
--post-folders=false --prefix-date=true
option puts meta info for Jekyll in markdown files. Yeyy!
Checkout: https://www.npmjs.com/package/wordpress-export-to-markdown
Then all we have to do is pick and choose what we want to keep and it can go to Jekyll.
See the Jekyll docs for more information on how to get the most out of Jekyll. Submut any bugs/feature requests to Jekyll’s GitHub repo. If you have questions, you can ask them on Jekyll Talk.
]]>Instead of using a VPS or other 3rd party service build a private, low cost, silent home server.
Check https://linuxhint.com/manjaro-package-manager-pacman/.
Temperature:
/opt/vc/bin/vcgencmd measure_temp
Update packages:
sudo pacman -Syu
Install some tools:
sudo pacman -S networkmanager vim mc htop wget
Start networkmanager:
sudo systemctl start NetworkManager
Auto start on boot:
sudo systemctl enable NetworkManager
Config network:
sudo nmtui
Here you will add your wifi device and configure it. Yo can enable the Security and enter your password if so inclined. The important things to not forget to do is enable these 2 lines before you save and exit:
[X] Automatically connect
[X] Available to all users
Stop MAC spoofing - for some reasons I needed to stop it:
sudo vim /etc/NetworkManager/conf.d/100-disable-wifi-mac-randomization.conf
with content:
[device]
wifi.scan-rand-mac-address=no
reboot…
Find an arm-linux version in https://dl.gitea.io/gitea/1.15.6/.
wget -O gitea https://dl.gitea.io/gitea/1.15.6/gitea-1.15.6-linux-arm64
sudo useradd \
--system \
--shell /bin/bash \
--user-group \
--disabled-password \
--home-dir /home/git \
git
(to be continued - hopefully…)
]]>Build the ultimate MP3 player - ultimate, becuase you might not want to buy any other mp3 player anymore!
Let’s see the components needed:
Ok, I am a cheater with this Dfplayer-thing, but don’t worry, it won’t be so easy. We will do it step by step.
Ok, so let’s do the thing.
Dfplayer uses an SD card to store music. It supports FAT16 , FAT32 file system, maximum support 32G of the TF card, support 32G of U disk, 64M bytes NORFLASH.
https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299
DFPlayer can work in 3 modes:
Now, for our purposes use serial mode. In serial mode we can control DFPlayer with some sort of byte commands. It leads us
quite quick to create a lib for it, but fortunately we can find many. Let’s see some! (In Arduino IDE: Tools -> Manage Libraries -> Search for DFPlayer) You should
choose DFRobotDFPlayerMini
.
Lets set up the following pinout:
(Nano) D11 - 1K Ohm resistor - RX
(Nano) D10 - TX
(Nano) GND - GND
(Nano) 5V - VCC
(Stereo Jack) R - SPK_1
(Stereo Jack) L - SPK_2
(Stereo Jack) GND - GND
Find code here: dfplayer_test.ino
Sketch uses 5356 bytes
- not bad, we will have 8k in case of Attiny85.
(to be continued…)
]]>It’s a bit old, but it is being posted and retweeted regurarly. You read it, and… you know, you see the point, but something is not right with it.
It turns out that our purely functional rendering code is sensitive to ordering in non-obvious ways. The first time I encountered this kind of bug, it felt strangely familiar – it’s something that often occurs in imperative programs. This is exactly the kind of problem that functional programming was supposed to help us avoid!
There is a quite good reaction on Reddit. I couldn’t react more accurate:
Moving the character and collision detection should not be two separate function that affect the state but that can be called separately (or in the wrong order) and keep the system in an incorrect state. Only the code responsible for modifying the state should do so, and it should guarantee to leave it in a correct state on returning. Moving without collision detection can leave the system in an incorrect state and thus should not even be a function that exists.
However, the moral of the story is right:
After experiencing the kinds of bugs I described above, it became clear to me that – despite their merits – immutable data structures are not a silver bullet.
Of course. Software systems can be too complex to solve most of complexity related problems with one simple concept like immutability.
]]>Required parts:
Put the Arduino Nano in ISP mode. Fortunately, you can find an example of this in the Arduino IDE: File -> Examples -> ArduinoISP
- upload without modification.
Under File -> Preferences -> Additional Boards Manager URLs
, enter the following: https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
. (mirror)
(If you find the URL unusable in the meantime, check out David A. Mellis’ Github.)
Under Tools -> Board -> Boards manager
choose “attiny” (by David A. Mellis) and install it.
If all goes well, you will see “Attiny” under Tools->Board
.
Check Attiny85 pinout:
(source)
Arduino Nano - Attiny85 connection:
*The original description incorrectly states that the anode (+) of the electrolytic capacitor should be connected to GND, of course the cathode should be connected to GND.
In Arduino IDE select the following options:
*Note that we usually use AVRISP mkii for Arduino…
By default Attiny85 runs at 1MHz, so you need to Tools -> Burn Bootloader
.
If everything went well so far, open the blink example (File -> Examples -> Basics -> Blink
). Change the pin from 13 to 0. (Or from LED_BUILTIN
to 0.) Upload.
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED\_BUILTIN as an output.
pinMode(0, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(0, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Now, this is harder to test than an usual Arduino app, because you need a separate power source to drive the Attiny. In the original descripton, a 3V button cell is used. But you can also draw the required current from the Arduino (disconnect the original wiring, of course):
Profit!
Under Arduino IDE 2.x you may get “A programmer is required to upload” error. Use Sketch -> Upload Using Programmer
when uploading to your ATtiny85. (ref)