ble2mqtt was very unstable for me and I only use the wp6003 sensor anyway, so I wrote this small python script. based on https://github.com/zu2/wp6003 add configuration.yaml to home assistants configuration.yaml.
Requirements: bleak paho click
| #!/bin/bash | |
| USER="AB12345" | |
| PASS="hunter2" | |
| echo "Getting courses..." | |
| COURSES=$(curl -s --ntlm -u "${USER}:${PASS}" https://www3.elearning.rwth-aachen.de/l2p/foyer/SitePages/PastCourses.aspx | grep -oE "https://www[0-9].elearning.rwth-aachen.de/(ws|ss)[0-9]{2}/[0-9]{2}(ws|ss)-[0-9]*") | |
| echo "Recursively download all courses using wget..." | |
| while IFS= read -r c |
| import {inspect} from 'util'; | |
| import {Takeaway, TakeawayConfig} from 'takeaway'; | |
| (async () => { | |
| try { | |
| const plz = "52080"; | |
| const coordLNG = '50.7'; | |
| const coordLAT = '6.0'; | |
| // Initialize configuration |
| FROM rust:slim-buster | |
| RUN apt-get update | |
| RUN apt-get install -y \ | |
| wget unzip curl \ | |
| build-essential cmake git libgmp3-dev libprocps-dev python-markdown libboost-all-dev libssl-dev pkg-config libopencv-dev | |
| # install verifiable image redacting library with workaround for now (see https://github.com/snp-labs/verifiable-image-redacting/issues/1 ) | |
| RUN git clone https://github.com/Romern/verifiable-image-redacting \ | |
| && cd verifiable-image-redacting \ |
| from flask import Flask, g, request, redirect | |
| from datetime import datetime | |
| import sqlite3 | |
| import random | |
| app = Flask(__name__) | |
| DATABASE = "short.db" | |
| SECRET = "UltraSecretCode32904235235" |
| #!/bin/bash -e | |
| FOLDER="/home/roman/Scanned/" | |
| PORT="$(lsusb | grep CanoScan | pcregrep -o1 "Bus ([0-9]*)")" | |
| DEVICE="$(lsusb | grep CanoScan | pcregrep -o1 "Device ([0-9]*)")" | |
| SCANBD_DEVICE="genesys:libusb:${PORT}:${DEVICE}" | |
| scanimage --format jpeg -d ${SCANBD_DEVICE} --source Flatbed --resolution 300 -o /tmp/scan.jpg |
ble2mqtt was very unstable for me and I only use the wp6003 sensor anyway, so I wrote this small python script. based on https://github.com/zu2/wp6003 add configuration.yaml to home assistants configuration.yaml.
Requirements: bleak paho click
Relays all TCP traffic to a HTTP proxy. Useful for using Burp and Android, my setup:
| /base64EncodingTable [ | |
| (A) (B) (C) (D) (E) (F) (G) (H) (I) (J) | |
| (K) (L) (M) (N) (O) (P) (Q) (R) (S) (T) | |
| (U) (V) (W) (X) (Y) (Z) (a) (b) (c) (d) | |
| (e) (f) (g) (h) (i) (j) (k) (l) (m) (n) | |
| (o) (p) (q) (r) (s) (t) (u) (v) (w) (x) | |
| (y) (z) (0) (1) (2) (3) (4) (5) (6) (7) | |
| (8) (9) (+) (/) | |
| ] def |
| %!PS | |
| %%%%%%%%%%%%%%%%%%%Helper Functions | |
| % (a) (b) -> (ab) | |
| /concatstrings { exch dup length | |
| 2 index length add string | |
| dup dup 4 2 roll copy length | |
| 4 -1 roll putinterval | |
| } bind def |