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 sys | |
import re | |
s=sys.stdin.read() | |
m = re.compile(r"Error: A resource with the ID \"([^\"]+)\"") | |
n = re.compile(r" with (.+)$") | |
x = False | |
val = None | |
for l in s.split("\n"): | |
f = m.match(l) | |
if f: |
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 requests | |
import base64 | |
import json | |
import sys | |
from urllib.parse import urlencode | |
def influx_query(q): | |
PASS='xxxx' |
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
#!/bin/sh | |
# | |
# How to use: | |
# * Sign up for account at 46elks.com. Note down API user/password (not same as account credentials) | |
# * Install this script and chmod 755 it | |
# * Put the credentials in the file /etc/sms.conf OR ~/.smsconf | |
# | |
# Now you can run the script e.g. echo "My message" | smsnotify [-f from_name] to_number1 to_number2... |
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 | |
# | |
# Tool to copy files/directory trees to/from devices where the only opening | |
# is a telnet/serial shell and there is nothing other than a basic busybox on the device. | |
# | |
import sys, socket, tempfile, shutil, re, time | |
import telnetlib as T |
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
"""Use pika with the QT socket notifier | |
To use: | |
import qt_connection | |
instead of e.g. pika.SelectConnection(...) | |
use qt_connection.QtConnection(appObject, ...) | |
""" | |
import logging | |
import time |