This file contains 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 gc | |
import uos | |
import machine | |
import jpegdec | |
import sdcard | |
from urllib import urequest | |
import network | |
from picographics import PicoGraphics, DISPLAY_INKY_FRAME_7 as DISPLAY # 7.3" | |
import time | |
from machine import Pin |
This file contains 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 <LoRa.h> | |
#include <Wire.h> | |
#include <BME280I2C.h> | |
#include "SSD1306.h" | |
#include <TinyGPS++.h> | |
#include <HardwareSerial.h> | |
#define GPS_TX 34 |
This file contains 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 <LoRa.h> | |
#include <Wire.h> | |
#include "SSD1306.h" | |
#include "SPIFFS.h" | |
#define SCK 5 // GPIO5 -- SX1278's SCK | |
#define MISO 19 // GPIO19 -- SX1278's MISO | |
#define MOSI 27 // GPIO27 -- SX1278's MOSI | |
#define SS 18 // GPIO18 -- SX1278's CS |
This file contains 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 <LoRa.h> | |
#include <Wire.h> | |
#include <BME280I2C.h> | |
#include "SSD1306.h" | |
#include <TinyGPS++.h> | |
#include <HardwareSerial.h> | |
#define GPS_TX 34 |
This file contains 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 "SPIFFS.h" | |
void setup() { | |
Serial.begin(115200); | |
if(!SPIFFS.begin(true)){ | |
Serial.println("An Error has occurred while mounting SPIFFS"); | |
return; | |
} |
This file contains 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
let po = new PerformanceObserver((list) => { | |
for (const entry of list.getEntries()) { | |
console.log(entry); | |
} | |
}); | |
po.observe({type: 'layout-shift', buffered: true}); | |
let po2 = new PerformanceObserver((list) => { | |
for (const entry of list.getEntries()) { |
This file contains 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 checkPaywall() { | |
let structured = JSON.parse(document.querySelector("script[type*='ld+json']").innerText); | |
let hasPart = null; | |
if(structured.hasPart) { | |
hasPart = structured.hasPart; | |
} | |
else if(structured.length) { | |
for(var i = 0; i < structured.length; i++) { | |
if(structured[i].hasPart) { | |
hasPart = structured[i].hasPart; |
This file contains 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 puppeteer = require('puppeteer'); | |
const { createCanvas, loadImage } = require('canvas') | |
var fs = require('fs'); | |
const fsExtra = require('fs-extra') | |
const mergeImg = require('merge-img'); | |
const mustache = require('mustache') | |
let MAX_URLS = 50; | |
let TEMPLATE = fs.readFileSync('template.html', 'utf8'); |
This file contains 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 puppeteer = require('puppeteer'); | |
const { createCanvas, loadImage } = require('canvas') | |
const mustache = require('mustache') | |
var fs = require('fs'); | |
const fsExtra = require('fs-extra') | |
let MAX_URLS = 50; | |
let TEMPLATE = fs.readFileSync('template.html', 'utf8'); |
This file contains 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
let po = new PerformanceObserver((list) => { | |
for (const entry of list.getEntries()) { | |
//console.log(entry); | |
let val = entry.value; | |
window.performance.mark('layout_shift_'+val); | |
} | |
}); | |
po.observe({type: 'layout-shift', buffered: true}); |
NewerOlder