Skip to content

Instantly share code, notes, and snippets.

View mariotti's full-sized avatar
💭
working @ 1plusX for the moment and TL now

mariotti mariotti

💭
working @ 1plusX for the moment and TL now
View GitHub Profile
@mariotti
mariotti / set-channels-min.sh
Created January 21, 2025 20:35
Set my default meshtastic channels - example
#! /bin/bash -x
#
# Defaults
#
defPSK="AQ=="
shortPSK="<YOUR 8bit Key>"
longPSK="<Your 256bit Key>"
mynetwork="mynet"
#
@mariotti
mariotti / set-device-min.sh
Created January 21, 2025 20:31
Set minimal device meshtastic defaults - example
#! /bin/bash -x
#
# Defaults
#
role="CLIENT"
#role="CLIENT_MUTE"
timezone="CET-1CEST,M3.5.0,M10.5.0/3"
region="EU_868" # "EU_433" / "EU_868" / <YOUR REGION>
gpsmode="disabled"
#gpsmode="enabled"
@mariotti
mariotti / percent_pop.sh
Created March 22, 2020 19:51
Simple get pro mille on population from COVID-19 data
#! /bin/bash
# To run this you will need to do first:
# 1) Get the data
# git clone https://github.com/CSSEGISandData/COVID-19; cd COVID-19
# 2) Run this script
# 3) Optionally plot them ... example for gnuplot at the end
#
# countriesPop="Switzerland:8570 Italy:60480 Spain:46660 Germany:82790 France:66990"
# Does not for all countries, for example France has "states"
#
@mariotti
mariotti / makeJSONfromMK
Created November 28, 2016 22:39
make json from markdown - markdown to json
#! /bin/sh
#
QQ="QUESTIONS.md"
#QQ="bin/makeJSONfromQ.QUESTIONS.test.md"
cat ${QQ} | tail +4 | sed 's/"/``/g' | \
awk 'BEGIN { Ccount=0; Qcount=0; QCcount=0; Ncount=0; firtsC=0; firstQ=0 } \
/^\*\*/ {Ccount++; QCcount=0; gsub(/^\*\*/,"",$0);gsub(/\*\*$/,"",$0);\
if (Ccount >1) \
{print "\t\t\t}\n\t\t]\n\t\t},"}
else {print "{ \"TechQuestions\" :\n\t{ \"category\" :\n\t["}; \
@mariotti
mariotti / taritdate.sh
Created September 4, 2015 16:15
Tar a directory adding the date
#! /bin/sh
#
# F.Mariotti: taritdate.sh
#
# Simple help text
if [ -z $1 ]; then
echo "please give a dir name."
exit 1;
fi;
#
@mariotti
mariotti / gplot.csh
Created September 4, 2015 15:50
quick plot data with gnuplot
#! /bin/tcsh
#
if ("a$1" == "a") then
echo "give a file name..."
exit
endif
if ("a$1" == "ahelp") then
echo "Usage: $0 <datafilename> [numcols]"
echo ""
exit