Setup XRDP on Ubuntu/Debian to allow Windows RDP access
random things I made and things I learnt making them
Setup XRDP on Ubuntu/Debian to allow Windows RDP access
#include <vector> #include <iostream> class Semantics { public: // Pass by value to store a new copy using std::move // (rvalue is moved, lvalue is copied) Semantics(std::vector<int> in) : m_v(std::move(in)) { } std::vector<int> get() const { return m_v; } // Pass by reference to modify an `out` parameter: lvalue only void append(std::vector<int> &out) { out.insert(out.end(),…
How do you convert a vector of 8bit values (bytes) to a vector of 32bit values (words)?
Why would you want to do such a thing? Well maybe you have a bytes stream that needs to be sent over a 32bit bus?
Typically it should just work but there are some catches when using a docker container environment. NOTE: You don’t need to create a bridge between the host NIC and the TAP device. When you run runqemu the tap device is automatically created to match the subnet of the network interface in the guest OS. See…
Achieve the flexibility of Map but with the type safety of scoped enumerations.
Allow reverse lookup of the enumeration type from the mapped value by using class template iterators.
Maps enum type literals to strings (or any type)
Singleton pattern ensure only single instance
Encapsulation checks if key exists to prevent lookup errors/exceptions.
Manage vector with the added safety of class encapsulation
Convert an unsigned integer to a vector of bytes (char) using function templates.
1. install ftdi-eeprom and libftdi using apt chris@chris-MacBookPro:~$ apt list –installed | grep ftdi ftdi-eeprom/jammy,now 1.5-5build3 amd64 [installed] libftdi1-2/jammy,now 1.5-5build3 amd64 [installed] libftdi1-dev/jammy,now 1.5-5build3 amd64 [installed] libftdi1-doc/jammy,jammy,now 1.5-5build3 all [installed,automatic] 2. Update udev rules Add a script that will unload the ftdi_sio and usbserial drivers. These drivers conflict with the libftdi driver and prevent ftdi_eeprom…
Monitor udev rules when devices are plugged/unplugged udevadm monitor Reload the udev rules without restart/logout sudo udevadm control –reload Note it might not seem like this is always necessary but if you skipp this command then you will get false positives and false negatives. After making changes to the .rule file, you should unplug the…