Skip to content

Instantly share code, notes, and snippets.

@NonaSuomy
NonaSuomy / GDSPush.ino
Created October 10, 2016 19:21
Arduino Garage Door System Push Notification
//* Name: Garage Door System
//* Hacker: NonaSuomy
//* Date: 20160630
//* Description: Garage door sends a push notification to instapush.im
//*
//* Sign-up & Setup instapush.im
//*
//* Goto the instapush dashboard after signing up: https://instapush.im/dashboard
//* Click "Apps" tab.
//* Click "+Add Application" button.
@NonaSuomy
NonaSuomy / streamtheworldka.py
Last active April 23, 2017 08:22
Send A Radio Station From streamtheworld.com to https://github.com/karawin/Ka-Radio hardware ESP8266 + VS1053 + 23LC1024
#!/usr/bin/env python
'''
User: NonaSuomy
Date: 20170406
Upda: 20170422
Desc: Found this script at: https://www.toofishes.net/blog/streamtheworld-streams-command-line/
Desc: Modified to send the streams to Ka-Radio further information: https://github.com/karawin/Ka-Radio/issues/25.
Usage: python2 streamtheworldka.py CIMXFM 10.13.37.65
^Radio callsign ^IP address of Ka-Radio Device
Requirements: python2 + curl
@NonaSuomy
NonaSuomy / streamtheworldespradio.py
Last active May 31, 2021 04:28
Send A Radio Station From streamtheworld.com to https://github.com/Edzelf/Esp-radio hardware ESP8266 + VS1053
#!/usr/bin/env python
'''
User: NonaSuomy
Date: 20170406
Upda: 20170422
Desc: Found this script at: https://www.toofishes.net/blog/streamtheworld-streams-command-line/
Desc: Modified to send the streams to esp-radio further information below in the comments and https://github.com/Edzelf/Esp-radio/issues/70 .
Usage: python2 streamtheworldespradio.py CIMXFM 10.13.37.65
^Radio callsign ^IP address of esp-radio Device
Requirements: python2 + curl
@NonaSuomy
NonaSuomy / demo.items
Last active April 27, 2017 03:26
ESP-Radio with Text To Speech for OpenHab https://github.com/Edzelf/Esp-radio
/opt/openhab/conf/items/demo.items <= remove this line before use...
Number Switch2 "Door State [MAP(switchs.map):%s]" <garagedoor> (gG) {mqtt="<[broker:hq/garage/switch1:state:default]"}
@NonaSuomy
NonaSuomy / CHANGELOG.md
Last active April 29, 2017 01:52
ESP-Radio README.md & CHANGELOG.md

ChangeLog

26-feb-2017: Better output webinterface on preset change. 01-feb-2017: Bugfix uploading files. 30-jan-2017: Allow chunked transfer encoding of streams. 23-jan-2017: Correction playlists. 16-jan-2017: Correction playlists. 02-jan-2017: Webinterface in PROGMEM. 28-dec-2016: Add support for resume after stop. 23-dec-2016: Add support for mp3 files on SPIFFS.

@NonaSuomy
NonaSuomy / XMLHTTPparse.ino
Created May 2, 2017 23:30
IHeartRadio XML Parsing on Arduino ESP8266
//http://playerservices.streamtheworld.com/api/livestream?version=1.5&mount=CIMXFMAAC&lang=en
#include <ESP8266WiFi.h>
#include <TinyXML.h>
const char* ssid = "SSID";
const char* password = "PASSWORD";
const char* host = "playerservices.streamtheworld.com";
const char* apiVersion = "1.5";
const char* mountPoint = "CIMXFMAAC";
@NonaSuomy
NonaSuomy / ESP_Radio.ino
Last active June 28, 2017 05:15
MQTT Status Updates
//******************************************************************************************
//* Esp_radio -- Webradio receiver for ESP8266, 1.8 color display and VS1053 MP3 module, *
//* by Ed Smallenburg (ed@smallenburg.nl) *
//* With ESP8266 running at 80 MHz, it is capable of handling up to 256 kb bitrate. *
//* With ESP8266 running at 160 MHz, it is capable of handling up to 320 kb bitrate. *
//******************************************************************************************
// ESP8266 libraries used:
// - ESP8266WiFi - Part of ESP8266 Arduino default libraries.
// - SPI - Part of Arduino default libraries.
// - Adafruit_GFX - https://github.com/adafruit/Adafruit-GFX-Library
@NonaSuomy
NonaSuomy / vm-backup.sh
Created June 13, 2017 05:16 — forked from cabal95/vm-backup.sh
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/bash
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1
@NonaSuomy
NonaSuomy / networkcfgs.sh
Last active July 24, 2017 22:50
Network interface configuration setup for http://nonasuomy.github.io/Infrastructure-Part-1/
#!/bin/sh
read -d '' vlannetwork <<- EOF
[Match]
Name=eno1
[Network]
VLAN=eno1.100
VLAN=eno1.200
VLAN=eno1.300
VLAN=eno1.400
@NonaSuomy
NonaSuomy / gist:a62a9a125d61fc5df748066961702ac6
Created June 30, 2017 01:01 — forked from anonymous/gist:8b4a0101f5101f756bb9
Get OAUTH2.0 access token for Google Voice with a shell-script
#!/bin/bash
##
## Authenticate with Google Voice
##
USAGE="`basename $0` {auth|refresh|token} ctx"
CTX_DIR=$HOME/.gvauth
CLIENT_ID="YOUR_CLIENTID_FROM_GOOGLE_DEVELOPER_CONSOLE"
CLIENT_SECRET="YOUR_CLIENTSECRET_FROM_GOOGLE_DEVELOPER_CONSOLE"
SCOPE="https://www.googleapis.com/auth/googletalk%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile"