Skip to content

Instantly share code, notes, and snippets.

View jue89's full-sized avatar

Juergen Fitschen jue89

  • SSV Software Systems GmbH
  • Germany
View GitHub Profile
@jue89
jue89 / container.nix
Last active November 28, 2025 13:33
Code Server Container
{ pkgs
, lib
, flakeInputs
, ...
}:
let
netIface = "enp0s20f0u4u1";
netPrefix = "192.168.42";
instances = [
{ port = 8084; probe = "303a:1001:CC:BA:97:F0:E2:F8"; }
// npm install modbus-serial
// node prog-sdm120.mjs [serial-dev] [current-id] [new-id (optiomal)]
import assert from 'node:assert';
import ModbusRTU from 'modbus-serial';
const port = process.argv[2];
assert(port, 'Paramter port missing');
const curId = parseInt(process.argv[3] || '1');
@jue89
jue89 / raspi-tauri.md
Created February 1, 2023 20:27
Build Tarui Apps for Raspberry Pi
# run the same Debian which's running on your RasPi
docker run --rm -it debian:bullseye

# add architecture
dpkg --add-architecture armhf
apt update

# add build tools
apt install curl build-essential gcc-arm-linux-gnueabihf pkg-config
@jue89
jue89 / Makefile
Last active January 4, 2020 17:37
riot-netif-bridge
# name of your application
APPLICATION = netif-bridge
# If no BOARD is found in the environment, use this default:
BOARD ?= homie-pihat
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
# Comment this out to disable code in RIOT that does safety checking
cd /opt
wget https://nodejs.org/dist/latest-v8.x/node-v8.16.0-linux-armv6l.tar.gz
tar xf node-*
rm node-*.tar.gz
cd node-*/bin
update-alternatives --install /usr/bin/node node $(pwd)/node 1
update-alternatives --install /usr/bin/npm npm $(pwd)/npm 1
node --version
@jue89
jue89 / github.php
Created February 12, 2017 01:32
Endpoint for GitHub's webhooks
<?php
// CONFIG:
// - Repository the webhook listens for
$REPO = "user/repository";
// - Branch to observe
$BRANCH = "master";
// - Action to be excuted
$ACTION = "/bin/date > /tmp/watchdir/lastrun";
// - Secret
@jue89
jue89 / test.path
Last active February 12, 2017 01:45
Systemd: Start service upon changed path
[Unit]
Description=Listen for touched file
[Path]
PathChanged=/tmp/watchdir
[Install]
WantedBy=multi-user.target
@jue89
jue89 / linux-gpib-for-a82357.md
Created November 29, 2016 17:29
Install linux-gpib for Agilent 82357A/B interface

Install dependencies

apt install build-essential linux-headers-$(uname -r) fxload pkg-config
wget "https://sourceforge.net/projects/linux-gpib/files/..."
tar xf linux-gpib-4.0.3.tar.gz
wget "http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2008-08-10.tar.gz"
tar xf gpib_firmware-2008-08-10.tar.gz

Compile linux-gpib

@jue89
jue89 / JessieSystemd.md
Last active October 25, 2016 23:22
Hardcore systemdify Debian Jessie

Hardcore Systemd for Debian Jessie

Install avahi-daemon

apt install avahi-daemon

Remove syslogd and activate persistent journal

apt purge rsyslog
@jue89
jue89 / fm-streamer.js
Created April 3, 2016 20:14
FM radio streamer based on SDR
"use strict";
let app = require( 'express' )();
let spawn = require( 'child_process' ).spawn;
let busy = false;
app.get( '/:freq', ( req, res ) => {
try {