Skip to content

Instantly share code, notes, and snippets.

View patrickelectric's full-sized avatar
🏡
Working from home

Patrick José Pereira patrickelectric

🏡
Working from home
View GitHub Profile
@patrickelectric
patrickelectric / image_to_udpsink
Created April 3, 2024 13:02
Creates a h264 udpsink from a static image
multifilesrc location="example.jpeg" ! jpegdec ! videoconvert ! imagefreeze ! videobox ! video/x-raw,format=I420,width=240,height=480,framerate=30/1 ! x264enc ! rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.0.55 port=5600
extern crate serde; // 1.0.79
#[macro_use]
extern crate serde_derive; // 1.0.79
extern crate serde_json; // 1.0.30, features = ["raw_value"]
#[derive(Serialize, Deserialize, Debug)]
struct DataBlob<'a> {
id: &'a str,
priority: u8,
payload: &'a serde_json::value::RawValue,
@patrickelectric
patrickelectric / image_processing.qml
Created December 21, 2023 16:14
Do edge filtering in qml
import QtQuick 2.7
import QtQuick.Controls 2.3
Rectangle {
color: "red"
anchors.fill: parent
AnimatedImage {
id: oldFrame
source: "https://cdn.pixabay.com/animation/2022/10/11/09/05/09-05-26-529_512.gif"
@patrickelectric
patrickelectric / main.py
Last active December 11, 2023 11:26
blueos screenshots pages
from selenium import webdriver
from PIL import Image
import time
from imageio import imwrite
url = "http://blueos-avahi.local"
paths = [
'/',
'/vehicle/autopilot',

Contributor Agreement

Entity Contributor Exclusive License Agreement

Thank you for your interest in contributing to Cockpit ("We" or "Us").

The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.

How to use this Contributor Agreement

@patrickelectric
patrickelectric / gist:1aaa4144a68a5af147a1dcaa30b5737c
Created November 1, 2023 18:06
steamdeck-for-developers.md
sudo systemctl enable sshd
sudo systemctl enable avahi-daemon
sudo nano /etc/avahi/avahi-daemon.conf
# make sure that: `publish-workstation=yes`

Contributor Agreement

Entity Contributor Exclusive License Agreement

Thank you for your interest in contributing to BlueOS ("We" or "Us").

The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.

How to use this Contributor Agreement

@patrickelectric
patrickelectric / bindings.h
Created August 7, 2023 15:13
Navigator 0.0.1 C++ bind documentation
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
/**
* @brief Set of available options to select ADC's channel.
*/
enum class AdcChannel {
This file has been truncated, but you can view the full file.
[{"id":"28223063343","type":"PushEvent","actor":{"id":1215497,"login":"patrickelectric","display_login":"patrickelectric","gravatar_id":"","url":"https://api.github.com/users/patrickelectric","avatar_url":"https://avatars.githubusercontent.com/u/1215497?"},"repo":{"id":277877505,"name":"bluerobotics/BlueOS-docker","url":"https://api.github.com/repos/bluerobotics/BlueOS-docker"},"payload":{"repository_id":277877505,"push_id":13199180457,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"537aa6d9f840e5af7b3489d872ef03e691056d98","before":"e203fddc73bb8599a4019fc2104e0a1a5ccc30ae","commits":[{"sha":"537aa6d9f840e5af7b3489d872ef03e691056d98","author":{"email":"williangalvani@gmail.com","name":"Willian Galvani"},"message":"core: frontend: fix installed extensions not being manageable when offline","distinct":true,"url":"https://api.github.com/repos/bluerobotics/BlueOS-docker/commits/537aa6d9f840e5af7b3489d872ef03e691056d98"}]},"public":true,"created_at":"2023-04-05T13:47:24Z","org":{"id":7120633,"login":
@patrickelectric
patrickelectric / blueos.qml
Last active March 6, 2023 13:08
Minimal QML example to fetch video and mavlink data from BlueOS
import QtQuick 2.7
import QtQuick.Controls 2.3
import QtMultimedia 5.8
import QtWebSockets 1.15
Item {
id: parentLayout
width: 640
height: 400