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
"use strict" | |
var request = require( "request" ); | |
var sensorIds = [ | |
"TAP_TEMP", | |
"PARTY_TENT_TEMP", | |
"ARMY_TENT_TEMP", | |
"TAP_OPEN", | |
"FISSA_ENABLED", | |
]; |
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
# Add it to `crontab -e` with | |
# */10 * * * * ~/check_fs.sh PUBLICNODEPART_OR_SPACE | |
# where space as node name is a special scenario | |
# NOTE: crontab uses `sh` which is somewhat spartan compared to `bash` | |
# Column number to place the status message | |
RES_COL=60 | |
# Command to move out to the configured column number | |
MOVE_TO_COL="echo -en \\033[${RES_COL}G" | |
# Command to set the color to SUCCESS (Green) |
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 | |
echo Setting up remote tunnel in screen session | |
screen -dmS tunnel autossh -N -R *:2222:localhost:22 -i .ssh/cypher tunnel@remote -p22 |
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
:<<"::CMDLITERAL" | |
@ECHO OFF | |
echo Welcome to %COMSPEC% | |
GOTO :CMDSCRIPT | |
::CMDLITERAL | |
echo "Welcome to ${SHELL}" | |
function REM { | |
# REM is used to execute linux shell code |
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
# Create certificate | |
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mycert.pem -out mycert.pem -subj "/C=NL/ST=Limburg/L=Heerlen/O=ACKspace/OU=demo/CN=localhost.ackspace.nl" | |
# Copied from https://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl | |
# add localhost to limit interfaces | |
httpd = BaseHTTPServer.HTTPServer(('', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket( httpd.socket, certfile='mycert.pem', server_side=True ) |
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 perl | |
# Blocks IP adresses in 3 steps: | |
# * unknown REGISTER (Can't find user) is blocked immediately | |
# * unauthorized INVITE is flagged (and blocked after 3 strikes) | |
# * authorized INVITES are unflagged (and the IP block is removed when the counter hits 0 (or less)) | |
# * IP based incoming call which is not from a trunk (defined in ACL) is blocked immediately | |
# this needs some adjustments in the FS config: | |
# An ACL list of ip adresses of trunks that setup calls to you: <list name="trunks" default="deny"> |
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 | |
WIDTH=1280 | |
HEIGHT=720 | |
if [ $# -eq 0 ]; then | |
echo "Testcard mosaic generator: generate 1 to 9 mosaic labeled testscreens" | |
echo -e "\tUses read, sed, wget and ImageMagick (convert and montage)" | |
echo -e "\tIt also uses Terence Eden's Testcard <https://github.com/edent/SVGtestcard>" | |
echo -e "\tUsage: $0 <name>[,subtitle>] [name[,subtitle]..]" |
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
// Standard includes | |
#include <limits.h> | |
#include <stdarg.h> | |
#include <stdio.h> | |
// System include | |
#include <Gigatron.h> | |
const int tinyfont[96] = { | |
#include "../Utils/BabelFish/tinyfont.h" |
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
// NOTE: make sure you disable the Arduino reset when using as serial terminal | |
// run: `systemctl enable [email protected]` (or the appropriate Arduino serial device | |
// edit: `/etc/systemd/system/getty.target.wants/[email protected]` | |
// and change | |
// ExecStart=...... $TERM | |
// into: | |
// ExecStart=...... vt52 | |
// then run: `systemctl daemon-reload` | |
// and: `systemctl restart [email protected]` |
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 python3 | |
#pip-3 install dnspython | |
import dns.resolver | |
import dns.e164 | |
import re | |
import sys | |
import optparse |
OlderNewer