Skip to content

Instantly share code, notes, and snippets.

View Yang-Xijie's full-sized avatar

Yang-Xijie

View GitHub Profile
@j-c-cook
j-c-cook / cross-compile-python.md
Last active November 22, 2025 11:25
Cross-compile Python for use on armv7l

Cross-compile Python for use on armv7l

Introduction

This post shows how to cross compile Python (using the [CPython][#cpython] implementation) for use on an armv7l chip. This can likely be extrapolated to other chip archetectures, but the proper cross-compilation toolchain would need to be substituded. The Python version utilized here is version 3.7.13. The driving force behind this effort was to get [python-can][#python-can] functional on an armv7l platform. This compilation process is done on a Ubuntu 20.04.4 LTS operating system. I have utilized various online references and will do my best to provide citation and links.

In my case the device with an armv7l chip contains a root file system and shared objects that are compiled using a version of [buildroot][#buildroot]. The buildroot menu configuration allows for the selection of Python 3 for installation, but not all of the basic packages are included. For example, importing the python-can package into an environment using Python 3 installed b

@disposedtrolley
disposedtrolley / arm-cross-compiler_macos.md
Created August 27, 2020 10:46
Installing the GNU ARM Embedded Toolchain for macOS

Introduction

The ARM Embedded Toolchain is a GNU licensed cross compiler for ARM CPU architectures, allowing you to compile C/C++ code into binaries which can execute on CPUs such as the Cortex-M line of microcontrollers.

When dealing with C/C++ embedded development, you have the choice of several compilers. Keil is probably the most well-known commercial brand in the embedded toolchain space. They have their own proprietary compiler and IDE which is quite popular for commercial applications (it's pricey and only runs on Windows).

@unnamedd
unnamedd / MacEditorTextView.swift
Last active December 3, 2025 23:40
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2025
* https://bsky.app/profile/tholanda.com
*
* (the twitter account is now deleted, please, do not try to reach me there)
* https://twitter.com/tholanda
*
* MIT license

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@lucasecf
lucasecf / StreamingExample.swift
Last active February 24, 2023 23:16
Example of how to use the streaming feature of the iOS MultipeerConnectivity framework
/*
For this Gist, we have two sides: sender and receiver. The same user can be a sender and a receiver, but I will separate this
two roles to be more clear.
This gist assumes thatyou already have a MCSession created, and the peers are connected,
*/