Skip to content

Instantly share code, notes, and snippets.

@j0uni
j0uni / gist:443c6e1f2e60a01c22091746fe1692cf
Created February 13, 2026 13:32
Control Ubuntu Desktop from macOS via VNC
# Control Ubuntu Desktop from macOS via VNC
A step-by-step guide to remotely control an Ubuntu 22.04 desktop from macOS using x11vnc.
## Prerequisites
- Ubuntu 22.04 (or similar) with a desktop environment
- macOS with built-in Screen Sharing
- Both machines on the same network
@j0uni
j0uni / gist:dbffc6b1e8ce36be618c7441a1a65192
Created November 11, 2025 22:02
Seeed Sensecap T1000-E firmware / flash recovery
# T1000-E Full Flash Corruption Recovery
## When You Need This
Your T1000-E is completely bricked:
- No LED, no USB, nothing works
- Device doesn't respond at all
- Flash is corrupted or erased
- Bootloader is gone
@j0uni
j0uni / gist:0efd26dbf9fac1dc92bb57fdbb993434
Created September 12, 2025 15:33
Meshtastic local + remote admin location lat/lon set with Python
import meshtastic
from meshtastic.serial_interface import SerialInterface
import time
# Connect to a local Meshtastic device (e.g., via serial/USB)
iface = SerialInterface()
# Replace with the target node ID you want to configure
target_node = "!" + "1309E2A0"
@j0uni
j0uni / gist:1bd3f471c0cf9a352b67af4297d8f6ab
Last active April 5, 2025 14:35
OpenAI pull request review Python script
import requests
import openai
import os
from openai import OpenAI
GITHUB_TOKEN = ""
OPENAI_API_KEY = ""
REPO_OWNER = "j0uni"
REPO_NAME = "rtl_icecast"
PULL_REQUEST_ID = 8
@j0uni
j0uni / fix_mysql.php
Created November 1, 2019 16:56
IDIOT-PHP-DEVELOPERS - Fix mysql_connect etc. deprecated (with mysqli_connect and so-on..)
<?php
// include file for php called "IDIOT-PHP-DEVELOPERS"
// this file is a dirty fix to fix deprecated mysql_ - functions.
// first of all, I really don't understand why these functions needed to be deprecated.
// this decision by PHP developer has caused hundreds or thousands work hours to fix
// about this "library" : it might have not all functions so feel free to continue this work
@j0uni
j0uni / gist:1630672c79a9894b2126f361ec4e5588
Created September 3, 2017 07:26
How to get fixed wing aeroplane work with DYS F4 FC work in iNav 1.7.2
How to get fixed wing aeroplane work with DYS F4 FC work in iNav 1.7.2 By default the motor_2 output doesn't support servos.
Use this mixer:
# mixer
mixer CUSTOMAIRPLANE
mmix 0 1.000 0.000 0.000 0.000
# servo
servo 1 700 2300 1400 125 -1
@j0uni
j0uni / Futaba SBUS latency test with Arduino Mega
Last active August 15, 2016 19:19
Futaba SBUS latency test with Arduino Mega
void setup()
{
Serial.begin(115200);
Serial3.begin(100000);
pinMode(13, OUTPUT);
}
uint8_t buffer[255];
uint8_t bufferPos=0;
@j0uni
j0uni / synth.cpp
Created February 25, 2016 11:11 — forked from genericpenguin/synth.cpp
Arduino Synth
/* Arduino Synth from
https://janostman.wordpress.com/2016/01/15/how-to-build-your-very-own-string-synth/
*/
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
// O2 Minipops rhythm box (c) DSP Synthesizers 2016
// Free for non commercial use
// http://janostman.wordpress.com
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
@j0uni
j0uni / gist:50cff9e926d772cecfe4
Last active August 29, 2015 14:24
AS3935 working on Arduino Pro Mini and Embedded Adventures Lightning sensor module on i2c
Using https://github.com/SkyeSweeney/Striker and http://www.embeddedadventures.com/as3935_lightning_sensor_module_mod-1016.html
SREJ = 2
NF_LEV = 2
Gain = 12
WDTH = 2
ISR: Noisy
ISR: Noisy
ISR: Noisy
ISR: Strike