Skip to content

Instantly share code, notes, and snippets.

@M4lF3s
M4lF3s / Lunatone RS232 Setup
Created May 20, 2024 18:07
Setup of Lunatone DALI-2 RS232 Interface
- Use Prolific USB Serial Adapter (SiliconLabs one did not work)
- Prolific Adapter should also not require any extra Drivers under Windows 10
- IMPORTANT: Set Baud Speed in Device Manager! 38400 8 n 1
- Use Nullmodem Cable to connect to USB Adapter
- on the other end of Cable connect Ports
- Port 2 (Nullmodem) <-> Rx (Lunatone DALI)
- Port 3 (Nullmodem) <-> Tx (Lunatone DALI)
- Port 5 (Nullmodem) <-> GND (Lunatone DALI)
- IMPORTANT #2: Hook up a DALI Device on DALI Bus of Lunatone SCI RS232 otherwise Cockpit Software will just say it didn´t fidn a Adapter
- More Detailed instructions and Pictures will come later, just wanted to store this Info somewhere after fiddeling aorund with the Devices for multiple hours...
@M4lF3s
M4lF3s / README.md
Created January 11, 2023 16:13
OnlyOffice Document Server Setup on Raspi3 w/ 1 Gig RAM
@M4lF3s
M4lF3s / README.md
Last active April 19, 2023 09:26
Kivy 2.1.0 Setup on Raspbian Bullseye Lite (headless) w/ SDL2 Window and using official 7" Touchscreen Display on a Raspberry Pi 4B

Initial Setup

  • Flash SD Card (use official Raspbian Imager -> saves you the hassle to Setup Wifi, Pi User, etc. headless)
  • Insert and Boot
  • Run sudo raspi-config and expand the FileSystem
  • Update with
    sudo apt-get update
    sudo apt-get upgrade
  • If asked for what to do with modified sshd config, choose: keep the local version currently installed
#
# Compare 2 Directories
#
nohup diff -r --no-dereference a b > mycommand.out 2>&1 &
#
# Backup with rsync
#
# The command will copy/sync all the files and directories present in directory foo to directory bar.
@M4lF3s
M4lF3s / SentenceEmbeddings.scala
Created September 18, 2020 08:39
Spark NLP SentenceDetector
override def annotate(annotations: Seq[Annotation]): Seq[Annotation] = {
val sentences = SentenceSplit.unpack(annotations)
val embeddingsSentences = WordpieceEmbeddingsSentence.unpack(annotations)
val embeddings = embeddingsSentences.map {
case (tokenEmbedding) =>
val allEmbeddings = tokenEmbedding.tokens.map { token =>
token.embeddings
}
@M4lF3s
M4lF3s / arch.txt
Last active September 4, 2020 14:03
Arch-Devbox Setup
# check internet with ping
fdisk -l -> get /dev/sd?
cfdisk /dev/sd?
# label type -> dos
# create partitions: 1G boot Type: Linux, 2G swap Type: swap, Rest home Type: linux
# write partitions and exit
mkfs.ext4 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.ext4 /dev/sda3
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
<title>Der GameOne Plauschangriff</title>
<link>https://www.rocketbeans.tv/</link>
<description>Die MTV GameOne-Redaktion lässt TV mal TV sein und schwingt sich beschwingt vor's Podcast-Mikro, um der gepflegten Dampfplauderei zu frönen. Angesagt sind aktuelle Themen aus der Videospiel-Welt, großangelegte Retro-Runden mit Nostalgiebonus und kritische Kino-Konversationen.</description>
<language>de-de</language>
<copyright>© 2008 - 2009 MTV Networks Germany</copyright>
<itunes:subtitle>Die MTV GameOne-Redaktion lässt TV