Skip to content

Instantly share code, notes, and snippets.

@dlech
dlech / gelo.py
Last active September 19, 2023 07:40
A program for LEGO MINDSTORMS Robot Inventor - Gelo model
# SPDX-License-Identifier: MIT
# Copyright (c) 2021 David Lechner <david@pybricks.com>
# A program for LEGO MINDSTORMS Robot Inventor - Gelo
# Developed using MINDSTORMS App v1.3.4 (10.1.0), hub firmware v1.2.01.0103
# Building instructions: https://www.lego.com/cdn/product-assets/product.bi.additional.main.pdf/51515_Gelo.pdf
# Hub API: https://lego.github.io/MINDSTORMS-Robot-Inventor-hub-API/
@kennykerr
kennykerr / IMemoryBufferByteAccess.cpp
Last active September 13, 2022 04:54
How to use IMemoryBufferByteAccess with C++/WinRT
#include "winrt/Windows.Foundation.h"
struct __declspec(uuid("5b0d3235-4dba-4d44-865e-8f1d0e4fd04d")) __declspec(novtable) IMemoryBufferByteAccess : ::IUnknown
{
virtual HRESULT __stdcall GetBuffer(uint8_t** value, uint32_t* capacity) = 0;
};
using namespace winrt;
using namespace Windows::Foundation;
@dlech
dlech / gist:3856248
Created October 9, 2012 02:34
From Mozilla Thunderbird source code
/// This imap folder cannot have children :-(
const nsMsgFolderFlagType ImapNoinferiors = 0x04000000;