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
rest: | |
- authentication: basic | |
scan_interval: 45 | |
resource: https://api.altesla.app/metrics | |
username: !secret altesla_vincode | |
password: !secret altesla_hashed_password | |
sensor: | |
- name: Tesla Model 3 | |
unique_id: 359a56b7b3f0 |
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
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js" integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA==" crossorigin="anonymous" referrerpolicy="no-referrer"> | |
</script> | |
<script> | |
function render_qr() { | |
let container = document.getElementById("qrcode"); | |
const urlSearchParams = new URLSearchParams(window.location.search); | |
const params = Object.fromEntries(urlSearchParams.entries()); |
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
// | |
// UIViewHierarchy.h | |
// | |
// Created by Denis Gryzlov on 09.08.13. | |
// Copyright (c) 2013 Armada. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIView (Hierarchy) |
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
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <EthernetUdp.h> | |
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
IPAddress ip(192, 168, 0, 177); | |
unsigned int localPort = 8888; | |
char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; |
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
- (UIImage *) imageByTrimmingTransparentPixels { | |
int rows = self.size.height; | |
int cols = self.size.width; | |
int bytesPerRow = cols*sizeof(uint8_t); | |
if ( rows < 2 || cols < 2 ) { | |
return self; | |
} | |
//allocate array to hold alpha channel |