Skip to content

Instantly share code, notes, and snippets.

View siredmar's full-sized avatar

Armin Schlegel siredmar

View GitHub Profile
#include "credentials.h"
#include <Arduino.h> // for type definitions
#define TINY_GSM_MODEM_SIM800
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(10, 11); // RX, TX
//#define DUMP_AT_COMMANDS
#define TINY_GSM_DEBUG Serial
/*========================================+
I Insel-Daten einlesen und konvertieren I
+=========================================*/
void ReadIsoInselHaus(char *name, void *mem, long lengh)
{
int i;
int sizex, sizey;
int saveanz;
TISOINSEL *aktinsel;
TISOHAUS *akthaus;
/*============================================+
I Struktur FILECHUNK! I
+=============================================*/
typedef struct {
char name[16];
long lengh;
} TCHUNK;
/*========================================+
I Structur Erzberg !! I
@siredmar
siredmar / fetchall.sh
Last active July 24, 2020 07:34
Script that fetches and pulls all remote branches of a bunch of git repositories
#!/bin/bash
#usage: ./fetchall.sh <dir-containing-several-git-repos>
input=$1
for git in $(find $input -maxdepth 1 -mindepth 1 -type d -printf '%f\n')
do
git -C $input/$git branch -r | grep -v '\->' | while read remote; do git -C $input/$git branch --track "${remote#origin/}" "$remote"; done
git -C $input/$git fetch --all
/*
sdlgui/example1.cpp -- C++ version of an example application that shows
how to use the various widget classes.
Based on NanoGUI by Wenzel Jakob <wenzel@inf.ethz.ch>.
Adaptation for SDL by Dalerank <dalerankn8@gmail.com>
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE.txt file.
*/
@siredmar
siredmar / repos_revisions.sh
Created December 10, 2020 15:48
Get all revisions of git repos recursively
#!/bin/bash
# Update all git directories below current directory or specified directory
# Skips directories that contain a file called .ignore
HIGHLIGHT="\e[01;34m"
NORMAL='\e[00m'
function update {
local d="$1"
if [ -d "$d" ]; then
@siredmar
siredmar / avro.go
Last active March 9, 2021 11:56
avro.go
package main
import (
"bytes"
"fmt"
"log"
"os"
"time"
"github.com/linkedin/goavro"
@siredmar
siredmar / eventhub_subscribe.go
Created March 9, 2021 11:56
eventhub_subscribe.go
package main
import (
"context"
"fmt"
"os"
"os/signal"
"time"
eventhub "github.com/Azure/azure-event-hubs-go/v3"
@siredmar
siredmar / eventhub_and_avro.go
Created March 9, 2021 12:16
eventhub_and_avro.go
package main
import (
"bytes"
"context"
"fmt"
"log"
"os"
"os/signal"
"time"
@siredmar
siredmar / edge-networking-macvlan.md
Created September 1, 2023 09:41
edgefarm edge node networking

To make edge networking working with a kind cluster (macvlan network - 192.168.1.192/27) and a physical edge node (192.168.1.100) one need to create a virtual device edgefarm0 and perform some routing

#!/bin/bash

echo 1 > /proc/sys/net/ipv4/ip_forward

IFACE=eth0
DUMMY_IP=192.168.2.1