Todo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> |
Scripts for my raspberry pi SDR RTL pager decoder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import re | |
message = "POCSAG512: Address: 241657 Function: 0 Alpha: HbRE: EVENT F150300647 - FROM POLICE ONSCENE, OCCUPANT OUT OF VEH ÄKMREÜ<NUL><NUL>" | |
repChars = {"Ä": "[", "Ü": "]", "<NUL>": ""} # define desired replacements here | |
def replaceText(text, rep): | |
# use these three lines to do the replacement | |
rep = dict((re.escape(k), v) for k, v in rep.iteritems()) |
Currently using the getpagermsg2mqtt_all.sh script, running on a pi with supervisord
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo curl -O http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | |
sudo apt-key add mosquitto-repo.gpg.key | |
sudo rm mosquitto-repo.gpg.key | |
cd /etc/apt/sources.list.d/ | |
sudo curl -O http://repo.mosquitto.org/debian/mosquitto-wheezy.list | |
sudo apt-get update | |
sudo apt-get install mosquitto mosquitto-clients -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://pushover.net/api# | |
import httplib, urllib | |
conn = httplib.HTTPSConnection("api.pushover.net:443") | |
conn.request("POST", "/1/messages.json", | |
urllib.urlencode({ | |
"token": "xxxxxxxxxxxxxxxxxxxx", | |
"user": "xxxxxxxxxxxxxxxxxxxx", | |
"title": "Title of message", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json | |
import urllib2 | |
import time | |
import datetime | |
import paho.mqtt.publish as publish | |
# Show's the last 10 episodes that have been downloaded using sickbeard recently |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automatically instal the latest nginx | |
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
#Make a backup copy of your current sources.list file | |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
#Now copy the following repositories to the end of ` /etc/apt/sources.list` | |
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list | |
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to check api limits with tweeepy | |
#http://tweepy.readthedocs.org/ | |
import tweepy # pip install tweepy | |
import time | |
# Consumer keys and access tokens, used for OAuth | |
consumer_key = '' | |
consumer_secret = '' | |
access_token = '' |