Skip to content

Instantly share code, notes, and snippets.

@martin-niklasson
martin-niklasson / How-To.md
Last active December 25, 2023 19:20
How to make an up-to-date OpenWRT image for loading onto a Raspberry Pi Compute Module 4 with a DFRobot Router Carrier Board.

The background is that the default OpenWRT image for Raspberry Pi lacks drivers for the LAN port (RTL8111) on the DFRobot board. DFRobot provide an image, but that one is made from a quite old daily snapshot of OpenWRT which is not entirely stable. Also, it is better to know how to fish than be given a fish.

DFRobot's page about the router board:
https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767

OpenWRT main page:
https://openwrt.org/

You are expected to have some general knowledge on Linux and OpenWRT. The instructions for flashing the resulting firmware image are presented on DFRobot's page.

@lynchjames
lynchjames / deploy.cmd
Last active May 4, 2024 16:36
Preparing Obsidian vault for pushing to Azure DevOps Wiki
echo 'Copying attachment files into .attachments folder'
cp attachments/* .attachments/
echo 'Updating attachment links'
find . -type f -name "*.md" -print0 | xargs -0 sed -i 's/(attachments\//(\/\.attachments\//g'
@stemsmit
stemsmit / ha-uninstall.sh
Last active January 13, 2024 14:19
Uninstaller for Home Assistant Supervised on Debian 10
#!/usr/bin/env bash
sudo systemctl disable apparmor
sudo systemctl disable hassio-apparmor.service
sudo systemctl disable hassio-supervisor.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
sudo rm /etc/systemd/system/hassio-supervisor.service
sudo rm /etc/systemd/system/hassio-apparmor.service
@kentaylor
kentaylor / ConnectionTestLoop.ino
Created November 24, 2016 19:11
Arduino code to test how long ESP8266 takes to connect to WiFi at power up.
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
#include <WiFiManager.h> //https://github.com/kentaylor/WiFiManager
const unsigned long ONE_SECOND = 1000 * 1000;
int start;
int now;
int codeTime;
IPAddress ip= IPAddress(192,168,1,27);
IPAddress gw= IPAddress(192,168,1,1);
IPAddress subnet= IPAddress(255,255,255,0);
@lg
lg / uap-ac-lite-openwrt.txt
Last active October 22, 2023 12:16
making the ubnt wifi awesome (uap ac lite) w/ openwrt
making the ubnt wifi awesome (uap ac lite) w/ lede (openwrt)
the reasons you would do this:
- you get 802.11r
- you get better roaming
- you get access to some new 5ghz channels
I AM NOT TO BE HELD RESPONSIBLE FOR ANYTHING IN HERE. DO AT YOUR OWN RISK. THANK YOU AND HAVE A LOVELY DAY.
** note that though we're using Lede, it's essentially openwrt minus the drama
@sscarduzio
sscarduzio / relog.sh
Created August 24, 2014 21:20
BtWiFi_with_FON automatic login written as a bash script. I have this running every 10 minutes on my raspberry pi
#!/bin/bash
# CONF
DBG=true
RELOG_UNAME=your@email.com
RELOG_PASSW=xxxxxxxxxxxxxxx
# END CONF
@remy
remy / map.js
Last active March 4, 2024 22:48
function map(x, in_min, in_max, out_min, out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}