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
| """Probe whether the IntesisHome / AC Cloud API accepts writes over HTTPS. | |
| pyIntesisHome sends commands over a TCP socket on port 5210. If the HTTPS | |
| API also accepted them, firewalled setups would stop being read-only. No | |
| such write command is documented; this tests the plausible candidates. | |
| Two checks, since either alone can mislead: | |
| 1. Echo. The API mirrors back any section name, including invented ones, | |
| so a section appearing in the response means nothing. A candidate |
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
| esphome: | |
| name: power-meter | |
| on_boot: | |
| priority: -100 | |
| then: | |
| - if: | |
| condition: | |
| switch.is_on: disable_wifi | |
| then: | |
| script.execute: schedule_disable_wifi |
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
| ## Telemetry setup | |
| # This ESPHome config broadcasts car telemetry (SoC, battery power, speed, charging status, odometer, etc.) | |
| # as [BTHome](https://bthome.io/) BLE advertisements — no WiFi/App required, just passive BLE beacons. | |
| # On the receiving end, the [BTHome Monitor](https://apps.apple.com/app/bthome-monitor) iOS app | |
| # listens for these advertisements and uses its webhook support to forward the decoded sensor | |
| # data to [ABRP](https://abrp.com/) (A Better Route Planner), acting as a simple BLE-to-HTTP bridge | |
| # so ABRP gets live vehicle data without any direct integration on the ESPHome side |
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
| version: '3.7' | |
| services: | |
| ubuntu: | |
| image: ubuntu:jammy | |
| container_name: vscode-server | |
| environment: | |
| - http_proxy=<----PROXY_URL----> | |
| - TZ=Etc/UTC | |
| - DEBIAN_FRONTEND=noninteractive | |
| command: /bin/bash -c "if [ ! -f /root/.installed ]; then \ |
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
| {"swagger":"2.0","info":{"version":"v1","title":"Vulog Carsharing FO API"},"basePath":"/api-fo/final","paths":{"/v1/availableVehicles":{"get":{"tags":["AvailableVehicles"],"summary":"All available vehicles.","description":"Get the list of all available vehicles, it can be a lot of data.","operationId":"V{versionAvailableVehiclesGet","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[],"responses":{"200":{"description":"An array of available vehicles","schema":{"type":"array","items":{"$ref":"#/definitions/AvailableVehicle"}}},"204":{"description":"No available vehicle found"}}}},"/v1/device/notification":{"post":{"tags":["Device"],"summary":"Susbcribe a phone device for push notifications","operationId":"V{versionDeviceNotificationPost","consumes":["application/json","text/json","application/json-patch+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"subscription","in":"body","description":"the subscription details","required":false,"sche |
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
| # Based on https://github.com/elastic/beats/blob/7.2/filebeat/module/apache/error/ingest/pipeline.json | |
| # Documentation at https://www.elastic.co/guide/en/logstash/current/logstash-config-for-filebeat-modules.html#parsing-apache2 is out of date | |
| filter { | |
| if [event][module] == "apache" { | |
| if [fileset][name] == "access" { | |
| grok { | |
| match => { "message" => ["%{IPORHOST:[source][address]} - %{DATA:[user][name]} \[%{HTTPDATE:[apache][access][time]}\] \"(?:%{WORD:[http][request][method]} %{DATA:[url][original]} HTTP/%{NUMBER:[http][version]}|-)?\" %{NUMBER:[http][response][status_code]} (?:%{NUMBER:[http][response][body][bytes]}|-)( \"%{DATA:[http][request][referrer]}\")?( \"%{DATA:[user_agent][original]}\")?", | |
| "%{IPORHOST:[source][address]} - %{DATA:[user][name]} \\[%{HTTPDATE:[apache][access][time]}\\] \"-\" %{NUMBER:[http][response][status_code]} -", | |
| "\\[%{HTTPDATE:[apache][access][time]}\\] %{IPORHOST:[source][address]} %{DATA:[apache][access][ssl][protocol]} %{DATA:[apache][acces |
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
| """ | |
| Support for interface with an Samsung TV. | |
| For more details about this platform, please refer to the documentation at | |
| https://home-assistant.io/components/media_player.samsungtv/ | |
| """ | |
| import logging | |
| import socket | |
| # from datetime import timedelta |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Collections.Specialized; | |
| using System.Web; | |
| using System.Windows.Forms; | |
| using Profile; | |
| using IHProfBL; | |
| using Microsoft.Win32; |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| namespace ConsoleApplication1 | |
| { | |
| class Program | |
| { |
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
| // Description: Returns true if a New Zealand NHI passes checksum validation, otherwise returns false. | |
| function is_nz_nhi(NHI) { | |
| var passTest = false; | |
| // Validation steps 1 and 2 | |
| if (/^[A-HJ-NP-Z]{3}[0-9]{4}$/.test(NHI)) { | |
| var checkValue = 0; | |
| // Init alpha conversion table omitting O and I. A=1~Z=24 | |
| var aplhaTable = "ABCDEFGHJKLMNPQRSTUVWXYZ".split(''); | |
| for (i = 0; i < 3; i++) { | |
| // Convert each letter to numeric value from table above |
NewerOlder