This file contains 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/python | |
# | |
# Dynamically populate NGINX config with network cameras | |
# detected via DHCP leases table and DNSMasq | |
# | |
import os | |
import sys | |
import time |
This file contains 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
# | |
# Build Version Generator | |
# Author: Jared Sanson <jared@jared.geek.nz> | |
# License: MIT | |
# | |
# Computes the current build version based either on the latest git tag + commit, | |
# or a pre-defined version specified in JSON. | |
# | |
# Version is built into a standalone library as a string that can be | |
# referenced by the application. |
This file contains 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
# | |
# FontGen | |
# Copyright (C) 2013 Jared Sanson <jared@jared.geek.nz> | |
# This work is licensed under the terms of the MIT license. | |
# For a copy, see <https://opensource.org/licenses/MIT>. | |
# | |
# Requires Python Imaging Library (PIL) | |
# | |
# To add a new font, create a new FONT dictionary and tweak the parameters | |
# until the output .png looks correct. |
This file contains 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
import urllib2 | |
import json | |
import sys | |
from random import randint | |
def get_channel_list(): | |
print "Requesting channel list..." | |
req = urllib2.urlopen('http://listen.di.fm/public%d' % randint(1, 3)) | |
return json.loads(req.read()) |