Skip to content

Instantly share code, notes, and snippets.

View callaars's full-sized avatar
🏠
Working from home

Joseph Callaars callaars

🏠
Working from home
View GitHub Profile
@richardsg307
richardsg307 / README.md
Last active January 7, 2024 09:04
Owl Intuition Full Featured Control Dashboard (almost) for Heating and Electricity

A few years ago Owl started charging for their service that enabled me to interrogate and update the settings of my Owl Intuition system. The main part I had was Central Heating control and monitoring of a single phase electrical supply. I decided then to write something to replace there service and be able to do it all myself. But I had no idea how to until I discovered Node-Red, which seemed to make communications with the Owl over UDP simple. So this project started as way for me to learn about Node-Red and how to use it.

A couple of months later the flow below has matured enough for me to be reasonably confident in publishing it for others to use and/or modify for their own purpose. I'm not saying it's perfect but it works for me.

The Flow enables you to control the Heating with buttons for switching between Comfort and Standby together with Toggle Buttons for Boosting or setting Away. The logic behind the buttons is a bit complex and has to cope with other methods being used to control the system (eg t

@aguynamedben
aguynamedben / README.md
Last active December 9, 2021 09:15
Setting up SQLCipher with node-sqlite3 and Electron

Gist notes

How I got SQLCipher working with Electron on macOS:

  • First compile SQLCipher and dynamically link it to macOS' crypto libraries. Don't use OpenSSL. Zetetic (makers of SQLCipher) say that using macOS' crypto libraries is definitely going to be easiest on a Mac. Note that using SQLCipher libraries installed via Homebrew is going to seem like it works, and it will on your computer, but Homebrew's SQLCipher dynamcially links OpenSSL, so your app will crash when deployed to other computers (i.e. dynamic linking will fail at run timer because other computer wont have OpenSSL installed). So you want to dynamically link macOS crypto.
  • Then you want to rebuild node-sqlite3 with a modified binding.gyp so that the SQLCipher library is statically linked into your SQLite binding. You should end up with a binary file ./node_modules/sqlite3/lib/binding/electron-v3.0-darwin-x64/node_sqlite3.node that has libsqlcipher.a statically linked within it. The statically linked libsqlcipher.a will in-turn dynamically
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@JofArnold
JofArnold / Login.m
Last active October 26, 2022 13:31
Using promises in React Native modules with Swift
// Created by react-native-create-bridge
// import RCTBridgeModule
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#elif __has_include(“RCTBridgeModule.h”)
#import “RCTBridgeModule.h”
#else
#import “React/RCTBridgeModule.h” // Required when used as a Pod in a Swift project
#endif