I use a cheap Tapo C100 webcam to monitor my 3D prints. It supports RTSP.
- Go to the Cameras section at https://connect.prusa3d.com
- Add a new camera.
- Click the QR code link
- Click "Start Camera"
I use a cheap Tapo C100 webcam to monitor my 3D prints. It supports RTSP.
This Gist is superseded by https://github.com/Ircama/PT-P300BT
The Brother P-touch Cube PT-P300BT labelling machine is intended to be controlled from the official Brother P-touch Design&Print 2 app for Android and iOS devices, instead of from a computer.
| // dm Klopapier Widget | |
| // | |
| // Copyright (C) 2020 by marco79 <[email protected]> | |
| // | |
| // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
| // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
| // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
| // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
| # prerequisites: | |
| ## install software | |
| apt install mariadb-server libmariadbclient-dev sqlite3 | |
| ## install mysqlclient in virtualenv | |
| su -c 'homeassistant/bin/pip3 install mysqlclient --upgrade' -l homeassistant | |
| ## create database | |
| mysql -e 'CREATE SCHEMA IF NOT EXISTS `hass_db` DEFAULT CHARACTER SET utf8' | |
| ## create user (use a safe password please) | |
| mysql -e "CREATE USER 'hass_user'@'localhost' IDENTIFIED BY 'hass_pw'" | |
| mysql -e "GRANT ALL PRIVILEGES ON hass_db.* TO 'hass_user'@'localhost'" |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
| # The original settings confirmed by running: rpm --showrc | |
| # -14: __gpg %{_bindir}/gpg2 | |
| # -14: __gpg_check_password_cmd %{__gpg} | |
| # gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so - | |
| # | |
| # -14: __gpg_sign_cmd %{__gpg} | |
| # gpg --batch --no-verbose --no-armor --passphrase-fd 3 | |
| # %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}} | |
| # --no-secmem-warning | |
| # -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename} |
| -- 多分こんな感じでできる | |
| local x_hub_signature = ngx.hader['X_Hub_Signature'] | |
| local body = ngx.req.read_body | |
| local expected_signature = 'sha1=' .. ngx.hmac_sha1(ngx.var.secret_token, body) | |
| if expected_signature ~= x_hub_signature then | |
| ngx.log(ngx.WARN, 'Invalid access detected') | |
| ngx.header.content_type = 'text/plain' | |
| ngx.status = ngx.HTTP_UNAUTHORIZED | |
| ngx.print('401 Access Denied') |
(Also see [remarkable][], the markdown parser created by the author of this cheatsheet)
| # MIB2YAML converts MIB files to YAML files for the Ruby SNMP library with support for imports | |
| # | |
| # The code is heavily based on http://snmplib.rubyforge.org/, the only addition is the "find imports" block | |
| require 'rubygems' | |
| require 'fileutils' | |
| require 'yaml' | |
| module MIB2YAML | |
| def MIB2YAML.convert(module_file, mib_dir = '.') |