I needed several VMs in Azure for testing purposes and I required a semi-stable HTTP server on each of them. Normally I give the VM a public IP, but since this was for testing purposes I did not want to waste any of my public IPs.
Azure VMs can still be accessed from the outside even without a public IP, but the IP changes during each reboot (at-least). Azure allows one to setup a DNS address for the dynamic IP to be used instead of the IP, which is awesome.
This can be done by:
Selecting the VM’s resource group under Resource Groups in the Azure portal.
Select the Public IP address associated with the VM.
Select Configuration and then specify the optionally DNS name.
Depending on the location of the VM, the DNS will look something like this:
Obviously, one must choose a name which does not conflict with another DNS in the Azure cloud.
The Remote Desktop Protocol (RDP) is a protocol used for remote desktop connections primarily against PC’s running Windows, or VMs in the Azure cloud. The protocol is similar to VNC in many ways.
The HTML5 application I am currently building required the ability to seamless connect to a desktop computer using RDP. HTML5 however does not support RDP and cannot easily be implemented in the browser due to:
HTTP cannot be used for cross-domain connections.
WebSocket is not implemented by the remote PCs that I need to connect to.
The solution I found was to “tunnel” an RDP connection through the server hosting my HTML5 application. Several solutions exists, one being: Myrtille.
Myrtille is basically an ASPX application hosted in IIS, which provide a WebSocket interface and HTML5 remote desktop client (it also support HTML4 using HTTP which is slower). Myrtille, upon getting a connection request from a web client, tunnels the request back and forth through a Gateway service which comes with Myrtille.
The gateway utilizes a free implementation of RDP callsed FreeRDP, specifically wfreerdp.exe on Windows. The gateway service spawns a wfreerdp.exe process which does the actual RDP connection to the remote desktop computer.
When the connection is made, mouse and keyboard input is sent from the HTML5 client in the browser, through Myrtille to wfreerdp. Image data is transmitted from wfreerdp back to the HTML5 client.
I recently installed MariaDB, a MySQL fork, on a Linux VM in the cloud for testing and development purposes. I really struggled with getting proper access from my dev machine to the installation in the cloud.
Simply put, I just wanted a totally open SQL database for deving and testing, nothing production wise was needed.
MariaDB is by standard pretty secure: a good thing, and does not allow remote access: also a good thing.
Firstly, one has to edit the proper .cnf file under /etc/mysql/* and set the bind-address from 127.0.0.1 to 0.0.0.0. MariaDB by default listens only on the loopback interface, thus making it impossible to reach it from outside either LAN or WAN.
Next up, one needs to restart the service: service mysql restart which will apply the changed bind-address.
Now it is possible to connect from outside, TCP/IP wise, however, the MariaDB user (such as root) needs to be granted access from outside to be able to actually make a logical connection to the DBMS.
This can be done by issuing the following SQL query (in this case, for root with password xyzw):
I stumbled upon the method of loci in my quest to improve my memory. Although I have an OK ability to recall information, I struggle with names of places and especially things.
The method of loci is an ancient technique invented by the Greeks I believe, where one mentally attach images, sounds, etc to known location, be it real or fictional, in ones memory. This method is also known as the memory palace technique.
The important part is to use locations which are well known for ones loci, for me this could be:
Left lamp-stand in my bedroom.
The bedroom door.
The dashboard of my car.
The desk of my work.
The first part of the first level of super Mario bros (where you get the mushroom for the first time).
To remember stuff, one breaks the subject into images/words/sounds that can be mentally attached to a loci. For instance, to remember the license plate number of AV28011 of a white van, I would place the following mental images in three locis:
Looking to the left laying in my bed, I see a VHS recorder with an AV out connector laying on my lamp-stand.
From the lamp-stand, I take the VHS through the door, where the number 28 is itched into the white paint.
Grabbing the handle, I notice the number 011 hanging on a waving sign under the handle.
When trying to remember the license plate of the white van, I just need to focus on the first loci: the lamp-stand in my bedroom. I will quickly see the VHS and from there know that I have to take it through the door, thus notice the 28 itched into the white paint, and finally see the number 011 hanging from the door handle.
I just tried this technique the other day, and I was impressed by how easily I remember the license plate of the white van.
If you struggle with memory recall, try this technique.
Lakka supports TurboGrafx/PCEngine emulation out of the box atleast for ROMs, but the CD roms (cue/bin) requires that one find the correct bios: syscard3.bin and uploads this into the system directory on the Lakka box. No issues with this if one can find the correct syscard3.bin file.
However, I still struggled getting PCE CD emulation to work since Retroarch crashed whenever I tried to load Castlevania: Rondo of Blood.
It took me some time to figure out what the problem was and no resources online was helpful. I finally pinpointed the issue to the .cue file of the release. Even though the .cue file was 100% correct, i.e. all .wav and .bin files were correctly referenced by the cue file with no apparent pathing issues, I had to change the cue file manually to get it to work:
I removed all spaces from the filenames, e.g. “rondo of blood(j).bin” -> “rondoofblood(j).bin”.
I removed all *special characters*, e.g. “rondoofblood(j).bin” -> “rondoofblood.bin”.
I changed all Tracks to be of BINARY Type, i.e. WAVE -> BINARY.
I believe step 3 was what did the trick for me. Example of an WAVE entry converted to BINARY:
FILE Track01.wav WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00
FILE Track01.wav BINARY
TRACK 01 AUDIO
INDEX 01 00:00:00
Not sure why this works, but it does atleast on the latest Lakka x86 build.
After booting the game, no sound would play of any kind. I wrongly believe this to be due to my hack above, but no, this was simply because the emulator defaults to 0% music, ambient and effects volume, but why?!?!
Increasing the volume to 100% fixed the issue.
BTW – Rondo of Blood for PCE is better than Castlavania X for the SNES even though they share alot of gameplay elements…