Skip to content

Instantly share code, notes, and snippets.

@bodiroga
bodiroga / network-tester.sh
Created March 15, 2023 21:49
Utilities to check IoMBian network stability
#!/bin/bash
MAX_CYCLES=24
NETWORK_UP_TIME=10m
NETWORK_DOWN_TIME=5m
NETWORK_INTERFACE="eth0"
NUM_CYCLE=1
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
@bodiroga
bodiroga / Installation steps.md
Last active April 14, 2021 13:04
Sensirion SF3X00 installation (Raspberry Pi)

INSTALATION STEPS

Flashing Raspbian (SD)

Enable SSH server

  • Disconnect and connect the uSD card again
  • In the 'boot' partition, create an empty file called 'ssh'
@bodiroga
bodiroga / Openweather + LED
Last active June 3, 2019 16:21 — forked from axpirina/Openweather + LED
OpenWeather zerbitzailetik eguraldiaren datuak jaso eta 3 LED kontrolatzen dituen programa
/*
* Author: Emmanuel Odunlade
* Complete Project Details http://randomnerdtutorials.com
* Help from www.arduinoslovakia.eu
* Modify by Aitor Iturrioz 2019
*
* LEd bat kontrolatu munduko edozein herritako tenperaturaren bitartez.
* https://docs.google.com/document/d/1wTtBcLh9Pbn-Gr9JKueGOrpSAZ_13NLqNpytrHgiW8w/edit
*/
@bodiroga
bodiroga / mqtt-ota-upload.py
Created April 28, 2019 21:37
PlatformIO and MQTT OTA
import paho.mqtt.client as mqtt
import base64, sys, math
from github import Github
from hashlib import md5
from os.path import basename
from platformio import util
Import("env")
project_config = util.load_project_config()
@bodiroga
bodiroga / apcupsd-nis-configuration
Created April 17, 2019 15:30
Instructions to install and configure the apcups daemon in NIS mode
# Physical connection
# Plug the RJ45 - USB cable in a free USB port of your server
# Check if device is detected as American Power Conversion Uninterruptible Power Supply (APC UPS)
lsusb
# Install the daemon
sudo apt install apcupsd
@bodiroga
bodiroga / esp32-gateway-micropython
Last active April 4, 2019 16:24
ESP32-Gateway with MicroPython
## Board in /dev/ttyUSB0
# Access Python interpreter through serial conection: picocom /dev/ttyUSB0 -b115200
# If you want to close the picocom conection, type: Ctrl + A and Ctrl + X
# Picocom and RShell can not be used at the same time
# Access filesystem with RShell: rshell -p /dev/ttyUSB0
# ESP32 flash memory is mounted on /pyboard
@bodiroga
bodiroga / install_squeezelite_1.8_personal.sh
Created August 27, 2016 00:20
Personal Squeezelite 1.8 installation with resample and autosilence
# Credits: https://gist.github.com/gene1wood/9ed024449c0f309f279a
sudo apt-get install squeezelite
sudo apt-get install libsoxr-dev libasound2-dev libflac-dev libmad0-dev libvorbis-dev libfaad-dev libmpg123-dev liblircclient-dev libncurses5-dev
dir="`mktemp --directory`"
cd "$dir"
git clone https://github.com/ralph-irving/squeezelite
cd squeezelite
OPTS="-DINTERACTIVE -DRESAMPLE" make