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
# ========================================================================== | |
# | |
# ZoneMinder Foscam FI8918W IP Control Protocol Module, $Date: 2009-11-25 09:20:00 +0000 (Wed, 04 Nov 2009) $, $Revision: 0001 $ | |
# Copyright (C) 2001-2008 Philip Coombes | |
# Modified for use with Foscam FI8918W IP Camera by Dave Harris | |
# Modified Feb 2011 by Howard Durdle (http://durdl.es/x) to: | |
# fix horizontal panning, add presets and IR on/off | |
# use Control Device field to pass username and password | |
# | |
# This program is free software; you can redistribute it and/or |
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
# config | |
$unifiServerURI = "https://192.168.1.1" # https://192.168.1.1 | |
$unifiUsername = "unifi-login-email" | |
$unifiPassword = "unifi-login-password" | |
# # # | |
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true } | |
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12' |
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
Param( | |
[Parameter(Mandatory=$true)] | |
[string]$url | |
) | |
# run in a directory that contains youtube-dl.exe and ffmpeg.exe | |
$qualityList = `.\youtube-dl.exe -F $url` | |
$videoOnly = $qualityList | Select-String -Pattern 'video only' -CaseSensitive -SimpleMatch | |
$best = $videoOnly[$videoOnly.length-1] |
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
<?php | |
$url = "https://hooks.slack.com/services/[Incoming-Webhook-URL]"; | |
$msg = "Test"; | |
parse_str($_SERVER['QUERY_STRING'], $output); | |
$msg = $output['message']; | |
$payload = 'payload={"channel": "#channel", "username": "bot-username", "text": "' . $msg . '"}'; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_POST, 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
from twisted.internet.defer import succeed | |
from klein import run, route | |
from squid import * | |
import time | |
left_eye = Squid(18, 23, 24) | |
right_eye = Squid(17, 27, 22) | |
color='ff0000' | |
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
/* | |
* Activate selected Fibaro pattern or preset colour on switch activation | |
* | |
* Author: Howard Durdle | |
* Based on the Pattern Trigger by Michael Hudson | |
* Based on the Turn-on-Police-Light-When-Switch-Is-On.groovy smartapp by twack | |
* https://github.com/twack/smarthings-apps/blob/master/Turn-on-Police-Light-When-Switch-Is-On.groovy | |
* | |
*/ |
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
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var fs = require('fs'); | |
var request = require('request'); | |
var app = express(); | |
app.use(bodyParser.json()); | |
app.get('/', function(req, res) { |
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
var request = require('request'); | |
var json = { | |
id: '1', | |
jsonrpc: '2.0', | |
method: 'GUI.ShowNotification', | |
params: { | |
title: 'title-test', | |
message: 'message-test' | |
} |
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
param ( | |
[Parameter(Mandatory=$true)][string]$client, | |
[string]$title = "Test Title", | |
[string]$message = "Test Message" | |
) | |
$data = @{ | |
id = '1' | |
jsonrpc = '2.0' | |
method='GUI.ShowNotification' |
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
import java.security.MessageDigest | |
preferences { | |
input("domoticzIP", "text", title: "Domoticz IP Address", description: "IP Address of the Server") | |
input("deviceID", "text", title: "Device ID", description: "The device id") | |
} | |
metadata { | |
definition(name: "Domoticz On Off Device", namespace: "hdurdle-smartthings", author: "Howard Durdle") { | |
capability "Switch" |
NewerOlder