Skip to content

Instantly share code, notes, and snippets.

const ethers = require('ethers');
const LitSDK = require('lit-js-sdk/build/index.node.js');
const lit = new LitSDK.LitNodeClient();
await lit.connect();
const chain = 'mumbai';
const saveAuthSig = {
sig: "0x<signature1>",
$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=1 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.020 (junction deviation, mm)
@masha256
masha256 / example.ino
Created November 14, 2017 20:51
makerhq ledboard example
#include <Arduino.h>
#include <Adafruit_NeoMatrix.h>
#define BOARD_WIDTH 10
#define BOARD_HEIGHT 20
#define ROWS_PER_GROUP 4
#define NEO_PIN 7
@masha256
masha256 / auto_mode.ino
Last active August 5, 2016 18:13
particle photon stepper tests
// This #include statement was automatically added by the Particle IDE.
#include "AccelStepperSpark/AccelStepperSpark.h"
#define STEP_FACTOR 8
bool forward = true;
// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper::DRIVER, A1, A2);
@masha256
masha256 / noiseometer_test.ino
Created June 24, 2016 01:07
Noiseometer Adafruit.io test code
// This example uses an Arduino/Genuino Zero together with
// a WiFi101 Shield or a MKR1000 to connect to shiftr.io.
//
// IMPORTANT: This example uses the new WiFi101 library.
//
// You can check on your device after a successful
// connection here: https://shiftr.io/try.
//
// by Gilberto Conti
// https://github.com/256dpi/arduino-mqtt
@masha256
masha256 / README.md
Last active December 23, 2018 16:50

Description

A Dashing widget to show Slack user presence on a dashboard.

Dependencies

Add the following to your dashing Gemfile

gem 'slack-api'
@masha256
masha256 / check_s3_age.rb
Last active February 5, 2016 05:35
nagios check script to check for max age of files in an s3 bucket. written in ruby, requires aws-sdk v2 gem.
require 'aws-sdk'
CONFIG = {
# nil to load from env
:aws_access_key => nil,
:aws_secret_access_key => nil,
:aws_region => nil,
# in seconds
@masha256
masha256 / README.md
Last active October 5, 2017 13:57
Hipchat presence widget for Dashing

Description

A Dashing widget to show Hipchat user presence on a dashboard.

Dependencies

Add the following to your dashing Gemfile

gem 'hipchat'
@masha256
masha256 / README.md
Last active February 16, 2017 11:49
Google Pie Chart for Dashing

Description

A Dashing widget to show a Google Visualizations Pie Chart on a dashboard.

Installation

Copy the google_pie.coffee, google_pie.html and google_pie.scss file to into /widgets/google_pie directory.

Add the following to the dashboard layout file:

@masha256
masha256 / README.md
Last active January 3, 2021 07:54
Google Gauge for Dashing

Description

A Dashing widget to show a Google Visualizations Gauge on a dashboard.

Installation

Copy the google_gauge.coffee, google_gauge.html and google_gauge.scss file to into /widgets/google_gauge directory.

Add the following to the dashboard layout file: