Skip to content

Instantly share code, notes, and snippets.

View edwork's full-sized avatar
📲
Edworking

Ed Boal edwork

📲
Edworking
View GitHub Profile
#!/bin/sh
## Posts the first argument as the message contents, appending the site's URL to the message.
wget -O- --post-data='{"chat_id": "-000000000", "text": "https://zabbix.example.org/\n'"$1"'", "disable_notification": false}' --header='Content-Type: application/json' https://api.telegram.org/bot000000:000000000000000000000000000000000000/sendMessage
esphome:
name: opengarage
platform: ESP8266
board: esp_wroom_02
wifi:
ssid: "<SSID>"
password: "<passphrase>"
manual_ip:
static_ip: <IP>
@edwork
edwork / Sannce.pm
Last active December 1, 2018 06:52 — forked from joshstrange/Xiaomi.pm
Control script for Sannce Cameras (work in progress)
package ZoneMinder::Control::Sannce;
use 5.006;
use strict;
use warnings;
require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);
<head>
<script type="text/javascript">
if (navigator.appVersion.indexOf("Win")!=-1) window.location="http://microsoft.com";
if (navigator.appVersion.indexOf("Mac")!=-1) window.location="http://apple.com";
if (navigator.appVersion.indexOf("Linux")!=-1) window.location="http://debian.com";
</script>
</head>
#!/bin/sh
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
#################################################
##
## Edwork 'services-start' Script
##
## Place in /jffs/scripts/services-start (chmod +x)
##
#################################################
@edwork
edwork / build.sh
Created November 7, 2017 18:13 — forked from btobolaski/build.sh
Jekyll build scripts for Jenkins
#!/bin/bash --login
cd $WORKSPACE
rbenv rehash
LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" jekyll build

CEC-Detection

Want to control a TV over HDMI-CEC via a remote RasPi? Include the following as a switch:

platform: command_line
switches:
    tv_power:
      command_on: "ssh pi@<ip_address> -i /home/homeassistant/.homeassistant/id_homeassistant 'echo on 0 | cec-client -s -d 1'"
 command_off: "ssh pi@ -i /home/homeassistant/.homeassistant/id_homeassistant 'echo standby 0 | cec-client -s -d 1'"

Keybase proof

I hereby claim:

  • I am edwork on github.
  • I am edwork (https://keybase.io/edwork) on keybase.
  • I have a public key whose fingerprint is 9B49 F251 62EB B6E0 79DD B109 DC66 8F61 3B83 903B

To claim this, I am signing this object: