Skip to content

Instantly share code, notes, and snippets.

@stonehippo
stonehippo / circuitpython_libraries.md
Last active November 21, 2020 02:44
Various CircuitPython libraries that I am developing or maintaining

My CircuitPython Libraries

I am developing or maintaining these CircuitPython libraries:

All of these are based on the [Adafruit CircuitPython Library Cookiecutter](https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/creatin

@stonehippo
stonehippo / Cross-platform-frameworks.md
Last active September 26, 2020 19:07
Cross-platform development frameworks for mobile and desktop

Cross-platform Frameworks

Over the past few years, the old "write once, run anywhere" mantra has gotten a refresh. The broad adoption of mobile devices has increased the need for solutions that allow developers to write core application code and UI in a single framework, and package that code for deployment. The following are some of the more popular cross-platform, modile-friendly frameworks for various languages.

Some of these solutions are hybrid frameworks, which provided containers for non-native app code and integrations with native features. Others compile to native code.

For a good rundown on the architecture and considerations in using hybrid platforms, take a look at Comparing Cross-Platform Frameworks.

Javscript

@stonehippo
stonehippo / python_on_microcontrollers.md
Last active April 29, 2021 16:33
Snaking around on tiny computers with Python, CircuitPython, and MicroPython

Python on microcontrollers

Python is a great language for development. Microcontrollers are wonderful for physical computing. What's better than either one alone? Both together!

The good news is there's growing support for using Python on microcontrollers, both as programming language off-board and directly interpreted on embedded hardware.

CircuitPython

Based on MicroPython, CircuitPython was created by Adafruit for its boards, and is intended to provide a easy to use, consistent interface across multiple microcontrollers. It also has an extensive library/driver bundle.

@stonehippo
stonehippo / Base.js
Last active April 12, 2020 22:49
Probing the temporal dead zone (TDZ) with classes and modules in Javascript
class Base {
constructor(x, y) {
this.x = x
this.y = y
}
get point() {
return {x: this.x, y: this.y}
}
}
@stonehippo
stonehippo / Node_event_service.md
Created April 12, 2020 17:32
A sample Node.js server for emitting events to a socket, and a simple client for receiving those events

Node Event Service Demo

I created a simple Node.js server that emits events, then uses a socket to publish them, as well as very basic client for listenting on that socket to consume the events.

This demo server was created as part of a POC for a broadcast system that required timestamp-based synchronization of events across multiple streams.

@stonehippo
stonehippo / Ramda_data_tinkering.md
Last active April 12, 2020 15:37
Messing around with Ramda.js and some data manipulation

Ramda.js Data Tinkering

I'm messing around with manipulating a data structure in Node.js using Ramda.js . Mostly I'm trying things like turning some data into a unified table based on a series of arrays (sort of like a database denormalization), and with some alternatives to the pre-packaged zip functions in the library.

@stonehippo
stonehippo / js_function_parameter_destructing_with_objects.js
Created April 6, 2020 16:09
A quick exploration of using object destructuring to make better function parameters in ES6+
// A quick tutorial on object destructuring and Javascript functions
/*
note: I'm using var here because I'm going to refactor the example
function several times. You should not do this with real code!
*/
// To start, we'll create a simple function to make a rect tangle
var makeRect = function (height, width) {
return {height: height, width: width}
}

Javascript 3D Libraries

I am looking into working on some web-based 3D graphics, so I'm collecting notes on the topic here.

Some popular libraries

@stonehippo
stonehippo / language_installers.md
Last active February 24, 2024 02:39
Programming language version managers

Programming language version managers

Keeping up to date with a program language installation isn't always easy. In particular, juggling the latest and greatest,legacy versions needed to maintain compatibility, keeping several versions of a langauge installed, or needing admin acess can be a real pain. The package manager included with your operating system, such as dpkg/apt or yum might help somewhat, but they usually cannnot handle multiple versions, typically want you to be an admin, and often do not have the most recent version available in their repos.

So what's an enterprising dev to do?

One answer is to install a dedicted tool for installing a managing a program language. These tools operate a bit like a language-specific package manager, with tools for installing, managing and swapping versions of a language. They operate by adjusting your path, often via a 'shim' pointing to a local install. They typically leave your system-installed versions alone. All in all, these tools are a huge boon