Skip to content

Instantly share code, notes, and snippets.

@redradist
redradist / Comparison Espressif ESP MCUs.md
Created January 12, 2024 20:10 — forked from sekcompsci/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@redradist
redradist / typescript_safescript_transformer_gen.js
Created September 12, 2021 12:37
TypeScript SafeScript Transformer generated test script
const str0 = "3124122";
const num0 = 9;
const str1 = "3124122";
const num1 = SafeScript.sub(str1, num0);
const num2 = 55 + num1;
const num3 = 5 + num0;
const num4 = (num3 + 1) + 8;
let num5 = 3;
num5 = SafeScript.add(num5, "3");
@redradist
redradist / babel_safescript_transformer_gen.js
Created September 12, 2021 12:31
Babel SafeScript Transformer generated test script
const str0 = "3124122";
const num0 = 9;
const str1 = "3124122";
const num1 = SafeScript.sub(str1, num0);
const num2 = SafeScript.add(55, num1);
const num3 = SafeScript.add(5, num0);
const num4 = SafeScript.add(SafeScript.add(num3, 1), 8);
let num5 = 3;
num5 = SafeScript.add(num5, "3");
@redradist
redradist / babel_safescript_transformer.js
Created September 12, 2021 12:28
Babel SafeScript Transformer test script
const str0 = "3124122";
const num0 = 9;
const str1 = "3124122";
const num1 = str1 - num0;
const num2 = 55 + num1;
const num3 = 5 + num0;
const num4 = (num3 + 1) + 8;
let num5 = 3;
num5 += "3";
@redradist
redradist / string_number_coercion.js
Created September 12, 2021 12:23
SafeScript string and number coercion
let y = 8;
...
y = SafeScript.add(y, "233"); // SafeScript will throw TypeError exception
...
@redradist
redradist / any_number_coericion.js
Created September 12, 2021 12:16
TypeScript any and number
// network_api.ts
class HttpPythonSiteObject {
...
}
function get_url_object(url: string): any {
...
return new HttpPythonSiteObject();
}
@redradist
redradist / string_number_coericion.js
Created September 12, 2021 12:11
TypeScript string and number coericion
let y = 8;
...
//@ts-ignore
y += "233"; // Ok from TypeScript compiler point of view
...
@redradist
redradist / string_number_coercion.js
Created September 12, 2021 12:07
TypeScript string number coericion error
let y = 8;
...
y += "233"; // Compilation error in TypeScript
...
@redradist
redradist / string_number_coercion.js
Created September 12, 2021 12:00
JavaScript string and number coercion
let y = 8;
...
y += "233"; // Possible error behaviour
...
@redradist
redradist / react_brython_hello_component.py
Created March 3, 2021 11:10
Simple React Hello component written using Brython
from browser import window, console, document
import javascript
React = window.React
@javascript.extends(React.Component)
class Hello:
def __init__(self, props, children):
javascript.super().__init__(props, children)