Skip to content

Instantly share code, notes, and snippets.

View JulianCataldo's full-sized avatar
🎭

Julian Cataldo JulianCataldo

🎭
View GitHub Profile
@ajfisher
ajfisher / firmatatest.js
Last active December 22, 2019 08:15
Serial comms over hardware UART for Johnny-Five between Arduino and a Raspberry Pi
var firmata = require('firmata');
var repl = require('repl');
var board = new firmata.Board('/dev/ttyAMA0',function(err){
//arduino is ready to communicate
if (err) {
console.log("err:" + err);
return;
}
console.log("Firmata Firing LEDs");
@difosfor
difosfor / my-element.ts
Last active September 21, 2023 02:25
Typed LitElement events
import { customElement, LitElement } from 'lit-element';
type UnpackCustomEvent<T> = T extends CustomEvent<infer U> ? U : never;
// Define custom event types and details here
interface CustomEventMap {
/**
* Dispatched when an error occurs.
*/
'my-error': CustomEvent<{ error: Error }>;
@csotiriou
csotiriou / ovhcloud.file-provider.js
Last active July 19, 2021 00:33
Upload file provider for Strapi - OVH with OpenStack. Article https://oramind.com/develop-strapi-upload-provider/
const pkgcloud = require('pkgcloud');
const streamifier = require('streamifier');
module.exports = {
init(providerOptions) {
const client = pkgcloud.storage.createClient(providerOptions);
const options = { container: providerOptions.defaultContainerName }
const remoteURL = () =>