Skip to content

Instantly share code, notes, and snippets.

@voodoojello
voodoojello / ubuntu-touch-tester.sh
Last active June 5, 2020 07:37
A simple Bash script for caching and testing Ubuntu Touch channels on Nexus devices. See https://developer.ubuntu.com/en/start/ubuntu-for-devices/installing-ubuntu-for-devices/ for dependencies.
#!/bin/bash
#
# ubuntu-touch-tester.sh
#
# A simple script to cache and install available
# Ubuntu Touch images on select Nexus devices.
#
# For more info see:
# https://developer.ubuntu.com/en/start/ubuntu-for-devices/devices/
#
@voodoojello
voodoojello / heat-index.pl
Last active August 29, 2015 14:21
Perl Heat Index Calculation
#!/usr/bin/perl
#
use strict;
use warnings;
my $tf = $ARGV[0]; # Temperature in degrees Fahrenheit
my $rh = $ARGV[1]; # Abs. Relative Humidity
my $hi = -42.379 + 2.04901523 * $tf
+ 10.14333127 * $rh
@voodoojello
voodoojello / dhcp_update_route53.pl
Last active November 16, 2019 12:54
A *really* basic AWS Route 53 Dynamic DNS Updater in Perl
#!/usr/bin/perl
#
# AWS Route 53 Dynamic DNS Updater
# (c)2014 Mark Page [m.e.page@gmail.com]
# Wed Dec 31 08:35:56 CST 2014
#
use strict;
use warnings;
use LWP::Simple qw(!head);
use WebService::Amazon::Route53;
@voodoojello
voodoojello / auto_therm.lua
Last active June 15, 2016 13:58
LUUP: AutoTherm - Set Thermostats by Inside/Outside Temp, Humidity, and Time of Day
module("auto_therm", package.seeall)
--
-- LUUP: AutoTherm - auto_therm.lua
-- Set Thermostats by Inside/Outside Temp, Humidity, and Time of Day
--
-- Authored: Mark Page [m.e.page_at_gmail.com]
-- Modified: Sat Mar 21 21:22:37 CDT 2015
--
-- Tested on Vera Lite - UI7 Version 7.0.2 (1.7.439)
-- Tested on Vera Edge - UI7 Version 7.0.5 (1.7.1018)
@voodoojello
voodoojello / make-shalla-rpz.pl
Last active July 4, 2023 22:50
Shallalist to DNS RPZ - A script to convert selected Shallalist categories (domains) and build an RPZ zone file for BIND DNS
#!/usr/bin/perl -w
#
# Shallalist to DNS RPZ
# Author: Mark Page [m.e.page_at_gmail.com]
# Modified: Sun May 11 06:19:05 CDT 2014
#
# Examples:
# perl make-shalla-rpz.pl (no arg, creates NXDOMAIN CNAME ".")
# perl make-shalla-rpz.pl A 192.168.2.1 (creates "A" redirect)
# perl make-shalla-rpz.pl CNAME nowhere.local (creates "CNAME" redirect)
@voodoojello
voodoojello / nxfilter.conf
Created May 4, 2014 04:11
NxFilter Upstart Config
#
# nxfilter.conf - NxFilter Upstart Config
# modified: Sun Apr 27 15:59:13 CDT 2014
# Mark Page [m.e.page_at_gmail.com]
#
description "NxFilter"
author "Mark Page [m.e.page_at_gmail.com]"
#
# Note: Upstart event logging for most Debian-based
@voodoojello
voodoojello / nx-backup.sh
Created May 4, 2014 04:07
This script will create a datestamped LZMA2 tarball of the current NxFilter state suitable for long-term backups, disaster recovery, or software upgrades.
#!/bin/sh
#
# NxFilter Stateful Backup
# Mark Page [m.e.page_at_gmail.com]
# modified: Sat May 3 07:40:51 CDT 2014
#
# This script will create a datestamped LZMA2 tarball
# of the current NxFilter state suitable for long-term
# backups, disaster recovery, or software upgrades.
#
@voodoojello
voodoojello / nx-shalla-update.sh
Created May 4, 2014 04:05
This script will download the current blacklist tarball from Shalla, extract it, stop NxFilter, call the nxd.ShallaUpdate import, restart the service, and clean up the mess.
#!/bin/sh
#
# Shallalist Downloader for NxFilter
# Mark Page [m.e.page_at_gmail.com]
# modified: Mon Apr 28 20:34:59 CDT 2014
#
# This script will download the current blacklist
# tarball from Shalla, extract it, stop NxFilter,
# call the nxd.ShallaUpdate import, restart the
# service, and clean up the mess.
@voodoojello
voodoojello / monit-tweet.pl
Created November 6, 2011 19:24
This is a simple script fired from the 'exec' function in monit [http://mmonit.com/monit/] that will scrape the monit log and tweet (DM) a message to the specified recipient(s).
#!/usr/bin/perl -w
#
# File: monit-tweet.pl
# App Version: 0.0.2.2a
# Created: Sat Nov 22 23:48:18 CDT 2010
# Modified: Thu Nov 17 20:38:06 CST 2011
# Authored: mark page [m.e.page@voodoojello.net]
#
# This is a simple script fired from the 'exec' function
# in monit [http://mmonit.com/monit/] that will scrape
@voodoojello
voodoojello / img2epub.pl
Last active April 28, 2021 12:51
Create ebook (EPUB) from PNG, JPG, or GIF images
#!/usr/bin/perl -w
#
my $app = {
'name' => 'img2epub',
'desc' => 'Create ebook (EPUB) from PNG, JPG, or GIF images',
'modified' => 'Mon Aug 15 06:03:05 CDT 2011',
'author' => 'mark page [m.e.page@gmail.com]',
'version' => '0.0.1.4b',
};