Skip to content

Instantly share code, notes, and snippets.

@alessionossa
alessionossa / # WebREPL relay ESP32.md
Last active February 24, 2024 20:32
MicroPython WebREPL relay for remote access

MicroPython WebREPL relay for remote access.

TunnelServer.py

TunnelServer.py hould be executed on a server: it waits on port 12014 for connection from ESP32 and on port 6690 for external connection to forward through TCP tunnel to ESP32.

main.py & boot.py

main.py and boot.py should be loaded on ESP32 board running the latest version of MicroPython.

@alessionossa
alessionossa / # macOS launchd WireGuard configurations.md
Last active June 16, 2022 08:39
macOS launchd WireGuard configurations

An example of launchd configuration files for WireGuard on macOS.

To start WireGuard at system startup, you should put com.example.wg.connectOnStartup.wg1.plist in /Library/LaunchDaemons/ folder. Note that on MacBooks, it looks like Global Daemons (aka scripts in /Library/LaunchDaemons/) are not loaded until a user login into an account.

#!/bin/bash
apt update -qq
wget -q https://github.com/jwhited/wgsd/releases/download/v0.3.1/wgsd_0.3.1_linux_amd64.tar.gz
mkdir wgsd
tar -xzf wgsd_0.3.1_linux_amd64.tar.gz -C ./wgsd
mv wgsd/coredns /usr/bin/
apt install -y wireguard
import SwiftUI
import Combine
struct ContentView: View {
enum SectionPane: Equatable, Identifiable, CustomStringConvertible {
case servers
case snippets
import UIKit
class ViewController: UIViewController {
let sourceText : String = "So Midas, king of Lydia, swelled at first with pride when he found he could transform everything he touched to gold; but when he beheld his food grow rigid and his drink harden into golden ice then he understood that this gift was a bane and in his loathing for gold, cursed his prayer"
var sourceData : [String]! {
didSet {
let dimensions : [CGSize] = {
var d : [CGSize] = [CGSize]()