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
| /* FOR COMMENTS PLEASE USE https://github.com/bfritscher/esp8266_PZEM-004T */ | |
| /* NOTIFICATION ARE NOT SENT BY EMAIL FOR GISTS :-( */ | |
| // VERSION 2 with WiFIManager integration for device_name | |
| #include <FS.h> //this needs to be first, or it all crashes and burns... | |
| #include <ESP8266WiFi.h> // ESP8266 Core WiFi Library (you most likely already have this in your sketch) | |
| #include <Ticker.h> // for LED status | |
| #include <DNSServer.h> // Local DNS Server used for redirecting all requests to the configuration portal |
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
| import esp | |
| from flashbdev import bdev | |
| import machine | |
| # https://github.com/micropython/micropython/issues/2352 | |
| ADC_MODE_VCC = 255 | |
| ADC_MODE_ADC = 0 | |
| def set_adc_mode(mode): | |
| sector_size = bdev.SEC_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
| var fontSize = 20; | |
| var style = document.createElement('style'); | |
| style.innerText = '#output li, #exec, .fakeInput, .fakeInput:before, #exec:before, #bin .editbox .CodeMirror, .mobile .editbox textarea{ font-size: ' + fontSize + 'px !important; }'; | |
| document.head.append(style); |
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
| var http = require('http'); | |
| var request = require('request'); | |
| function onRequest(req, res){ | |
| // Set CORS headers | |
| res.setHeader('Access-Control-Allow-Origin', '*'); | |
| res.setHeader('Access-Control-Request-Method', '*'); | |
| res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET'); | |
| res.setHeader('Access-Control-Allow-Headers', '*'); | |
| if ( req.method === 'OPTIONS' ) { |
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
| // ==UserScript== | |
| // @name Mozilla Thimble Projects Sorter | |
| // @namespace https://gist.github.com/bfritscher/0521b90c347c89cf40ff5e4258975ae0 | |
| // @version 2 | |
| // @match https://thimble.mozilla.org/* | |
| // @grant none | |
| // ==/UserScript== | |
| document.querySelectorAll('.glitch-banner').forEach( it => it.remove()); | |
| document.querySelectorAll('.glitch > .btn.export-button').forEach( it => it.remove()); |
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
| function addOverlay() { | |
| destroyOverlay() | |
| overlay = document.createElement('div'); | |
| overlay.classList.add('annotation-overlay'); | |
| overlay.setAttribute('style', 'position:absolute;top:0;left:0;right:0;bottom:0;'); | |
| document.body.appendChild(overlay); | |
| } | |
| function destroyOverlay() { |
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
| <?php | |
| require('../myfeeds/core.php'); | |
| if (!isset($_GET['site']) or !isset($_GET['size'])) { | |
| print("site: roundshot subdomain chaumont, neuchatel, lacdeneuchatel, jeunesrives, nyon-tourisme, morgesregion<br>morgesregion folder: ville<br>size: full, half, quarter, oneeighth, thumbnail"); | |
| die(); | |
| } | |
| $site = $_GET['site']; | |
| $size = $_GET['size']; | |
| $folder = isset($_GET['folder']) ? $_GET['folder'] . '/' : ''; | |
| $json = json_decode(file_get_contents("https://$site.roundshot.co/{$folder}structure.json")); |
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
| // ==UserScript== | |
| // @name cyberlearn fix | |
| // @namespace ig.he-arc.ch | |
| // @match https://cyberlearn.hes-so.ch/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author Boris Fritscher | |
| // @description 8/16/2022, 10:49:56 AM | |
| // ==/UserScript== |
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
| /********* | |
| ESP8266 Server + HC-SR04 ultrasound | |
| required libraries: | |
| - https://github.com/me-no-dev/ESPAsyncTCP | |
| - https://github.com/me-no-dev/ESPAsyncWebServer | |
| Adapted from | |
| Rui Santos |
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
| const W3CWebSocket = require("websocket").w3cwebsocket; // npm install websocket | |
| const host = "127.0.0.1"; | |
| const port = 8123; | |
| const protocol = "ws"; // ws or wss if ssl | |
| // long lived access token from profile > Create Token | |
| const access_token =""; | |
| const entityName = "Energy Consumption"; | |
| const entityId = "energy_consumption_kwh"; |