Diverse projekt och information. Mest på engelska men ibland på svenska.
Here you find info regarding different projects. Mostly because I need to remember what I'm doing. If then also somebody else will benefit — great! Some things here could be in Swedish. Google translate?
| Blazor webapp | Smart Lights | Linux audio | Microsoft Activation Scripts | Ledger Nano X in Linux | Musiklärare i grundskolan |
Nginx and a Microsoft Blazor Webapp. Had this on a Linode Server running Ubuntu 20.04 LTS but wanted to do away with that monthly cost. Maybe I'll set it up again somewhere. Got much from this tutorial.
Create and edit a Blazor webapp (blazorwasm) in a folder, for example "wasm", on your local computer. Make sure that you have the same version of dotnet on the local computer as on the server.
Open a terminal and run:
dotnet new blazorwasm -o wasm
or use Visual Studio.
Transfer the files in the folder to the /home/thomasa/wasm folder on the server.
To start the webapp, open a terminal on the server and go to:
cd /home/thomasa/wasm
Now run:
dotnet run
If you want "auto update", run:
dotnet watch run
To run the webapp in its own terminal instance, you may want to use the screen command:
screen
To restore screen after new login, use:
screen -r
A smart light system installed at home:
The Raspberry pi is connected to the local network through the home router. The Rasperry Pi is running the Linux distribution Patchbox which actually is an audio distribution but works for this cause as well.
Node-RED is running on Patchbox and controls and connects the Hue router and Blynk.
An image of the connections:
The Raspberry pi is headless and its desktop can be controlled with VNC Viewer from Windows.
Node-RED can be reached from a browser in Patchbox at localhost:1880 or from anywhere else at the Raspberry pi:s address in the local home network, for example: 192.168.0.148:1880
Running a Raspberry Pi headless over the local network and integrating Linux audio applications with Windows:
The Raspberry Pi is connected to the local network through the home router and it is running the Linux distribution Patchbox (currently the same installation that also runs the Smart Lights, see above). It is run headless, i.e. no keyboard or mouse, but is controlled from the Windows computer with VNC Viewer.
Start Multimidicast on the Windows computer and configure it to send MIDI. A typical command line can look like the following. You have to figure out what numbers relate to your MIDI equipment and the loopMidi ports.
C:\Program Files (x86)\Multimidicast>multimidicast.exe -in0 3 -out0 5
Start Jack on the Windows computer. A typical command line can look like the following. The portaudio string depends on your audio equipment.
C:\Program Files (x86)\Jack\jackd.exe" -R -S -d portaudio -d "ASIO::AudioBox ASIO Driver" -r48000 -p128
Start Zita-njbridge on the Windows computer. Use zita-n2j here for recieving audio. The IP-address is that of the Windows computer. The string "1234" could be anything but must be the same on both sending and recieving computer.
C:\Program Files (x86)\Jack>zita-n2j 192.168.0.109 1234
Start QJackCtl or any other Jack GUI on the Windows computer and make the connections.
Start Jack on the Raspberry Pi. If you use QJackCtl it will automatically start Jack. Make sure that Sample Rate is set to 48000 and Frames/Period to 128.
Start Zita-njbridge on the Raspberry Pi. Use zita-j2n here for sending audio. The IP-address is that of the Windows computer. The string "1234" could be anything but must be the same on both sending and recieving computer.
patch@patchbox:~ $ zita-j2n 192.168.0.109 1234
Start some audio application and make the connections in Jack on the Raspberry Pi.
The audio on the Raspberry Pi is now sent to and heard on the Windows computer.
If the synthesized pipe organ Aeolus is started with the -B option it will output four channels of ambisonics B-format: W, X, Y and Z. There are two standards for how the four channels are ordered: FuMa (WXYZ) and AmbiX (WYZX). If using Waves NX Ambisonics to encode, be sure to order the channels according to the AmbiX standard: Connect Aeolus WXYZ to Waves WYZX. See Ambisonics Explained.
A collection of scripts for activating Microsoft products using HWID / KMS38 / Online KMS activation methods with a focus on open-source code, less antivirus detection, and user-friendliness.
Download here: MAS 1.5 Password 1234.
Instructions: massgrave.dev.
An Office license with product key can be hard to activate. This works even when you have a product key (in Swedish):
Hur man aktiverar Microsoft Office 2019.
Or download here, unzip and run: ActivateOffice2019.zip.
If Ledger Nano X is not recognized in Linux, set up udev rules.
wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash
Got this from here: Ledger Support. Choose the Linux tab and click "Soloution 1. Setup udev rules".