My goal of this project was to be able to receive the NOAA weather radio, decode alerts and trigger webhooks and stream the audio from the SDR.
- RTL-SDR Dongle (with antenna)
- Device to host dongle
- Running Home Assistant instance
Here's a sensible .screenrc that does the following:
| import re | |
| # http://stackoverflow.com/a/13752628/6762004 | |
| RE_EMOJI = re.compile('[\U00010000-\U0010ffff]', flags=re.UNICODE) | |
| def strip_emoji(text): | |
| return RE_EMOJI.sub(r'', text) | |
| print(strip_emoji('🙄🤔')) |
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
| <?xml version="1.0" ?> | |
| <!DOCTYPE service-group SYSTEM 'avahi-service.dtd'> | |
| <service-group> | |
| <name replace-wildcards="yes">AirPrint HLL2300D @ %h</name> | |
| <service> | |
| <type>_ipp._tcp</type> | |
| <subtype>_universal._sub._ipp._tcp</subtype> | |
| <port>631</port> | |
| <txt-record>txtvers=1</txt-record> | |
| <txt-record>qtotal=1</txt-record> |
| [gammu] | |
| port = /dev/tty.HUAWEIMobile-Modem | |
| connection = at19200 | |
| model = at | |
| synchronizetime = yes | |
| logfile = /Users/me/.gammu/log | |
| logformat = errorsdate | |
| gammucoding = utf8 | |
| [smsd] |
| import Cocoa | |
| import Foundation | |
| var str = "Hello, playground" | |
| var task:NSTask = NSTask() | |
| var pipe:NSPipe = NSPipe() | |
| task.launchPath = "/bin/ls" | |
| task.arguments = ["-la"] |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |
| var tonerUrl = "http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png"; | |
| var url = tonerUrl.replace(/({[A-Z]})/g, function(s) { | |
| return s.toLowerCase(); | |
| }); | |
| var basemap = L.tileLayer(url, { | |
| subdomains: ['','a.','b.','c.','d.'], | |
| minZoom: 0, | |
| maxZoom: 20, |