Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Rude mattrude

View GitHub Profile
@mattrude
mattrude / frequency-plans.yml
Created Jun 28, 2021
The Things Network frequency-plans.yml file
View frequency-plans.yml
- id: US_902_928_FSB_2
name: United States 902-928 MHz, FSB 2 (Default, use this one)
description: The Community Network frequency plan for the United States and Canada, using sub-band 2
base-frequency: 915
country-codes: [ca, cr, ec, gy, mx, pa, pr, us]
file: US_902_928_FSB_2.yml
- id: US_902_928_FSB_1
name: United States 902-928 MHz, FSB 1
description: Default frequency plan for the United States and Canada, using sub-band 1
@mattrude
mattrude / global_conf.json
Created Jun 10, 2021
The global_conf.json for TTN Stack
View global_conf.json
{
"SX1301_conf": {
"lorawan_public": true,
"clksrc": 1,
"antenna_gain": 0,
"radio_0": {
"enable": true,
"type": "SX1257",
"freq": 904300000,
"rssi_offset": -166.0,
@mattrude
mattrude / traccar-v2.php
Last active Feb 9, 2021
A helper file to transmit locations from TheThingsNetwork to Traccar
View traccar-v2.php
<?php
$json = file_get_contents('php://input');
$data = json_decode($json, true);
$id = $data["dev_id"];
$lat = $data["payload_fields"]["latitude"];
$lon = $data["payload_fields"]["longitude"];
$altitude = $data["payload_fields"]["altitude"];
View build-script.md

To run:

curl -Ls "https://gist.githubusercontent.com/mattrude/4195d155c5deb53b628055a5f83fd5e3/raw/raspi-build.sh" |sh -
@mattrude
mattrude / cloudflare-zone-updater.sh
Last active Sep 5, 2020
Cloudflare Zone Updater
View cloudflare-zone-updater.sh
#!/bin/bash
Host="lora"
Domain="theodin.network"
User="<--Cloudflare-Username-->"
Key="<--Cloudflare-API-Key-->"
###############################################################################################
Missing=''
@mattrude
mattrude / LHT65-chirpstack-decoder.js
Last active May 5, 2021
TTN or ChirpStack Payload Decode Codec for the Dragino LHT65 Remote Sensor
View LHT65-chirpstack-decoder.js
/*
* ChirpStack Payload Decode Codec for the Dragino LHT65 Remote Sensor
* Version 0.1.0 - 2020-08-14 - Matt Rude <matt@mattrude.com>
*
* *******************************************************************************
*
* Copyright (c) 2020 Matt Rude <matt@mattrude.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
View radar.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattrude
mattrude / _The_Things_Network_coding_data.md
Last active Jul 23, 2020
This is the decoder/converter/validator code used in my "The Things Network" Applications Payload Formats
View _The_Things_Network_coding_data.md

This is the decoder/converter/validator code used in my "The Things Network" Applications Payload Formats

View GNU Screen Cheat Sheet.md

GNU Screen Cheat Sheet

Basics

  • ctrl a c -> cre­ate new win­dow
  • ctrl a A -> set win­dow name
  • ctrl a w -> show all win­dow
  • ctrl a 1|2|3|… -> switch to win­dow n
  • ctrl a " -> choose win­dow
  • ctrl a ctrl a -> switch between win­dow
  • ctrl a d -> detach win­dow
View raspi-fan-control-installer.md

Raspberry PI Fan Controller

To install run:

curl -Ls "https://git.io/JU4cX" |bash -