Skip to content

Instantly share code, notes, and snippets.

View notroj's full-sized avatar
🕶️
It's still broken

Joe Orton notroj

🕶️
It's still broken
View GitHub Profile
#!/usr/bin/python3
#
# Create nrg.conf with data from https://octopus.energy/dashboard/developer/
#
# [octopus]
# key = <<api key>>
# mpan = <<electricity meter MPAN>>
# elec-serial = <<electricity meter serial>>
import sys
#!/usr/bin/python3
#
# Copyright (C) 2020 Joe Orton
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
#!/bin/sh
function match_24x() {
local branch=$1; shift;
local tag=$1; shift;
local rv=`travis-conditions eval '(branch is present AND branch = 2.4.x) OR (tag is present AND tag ~= /^2.4/)' --data '{"branch": "'$branch'", "tag": "'$tag'"}'`
if [ $rv = "true" ]; then
echo PASS
for (p = plist; p; p = pnext) {
pnext = nextSibling(p);
String *tm = Getattr(p, "tmap:in");
if (tm) {
if (checkAttribute(p, "tmap:in:numinputs", "0")) {
continue;
}
}