Skip to content

Instantly share code, notes, and snippets.

from mindstorms import MSHub, Motor, MotorPair, ColorSensor, DistanceSensor, App
from mindstorms.control import wait_for_seconds, wait_until, Timer
from mindstorms.operator import greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to
import math
# Create your objects here.
tricky = MSHub()
movement_motors = MotorPair('A','B')
distance_sensor = DistanceSensor('D')
View alarm.groovy
import groovy.json.JsonSlurper;
preferences {
section() {
input("integrateSHM", "boolean", title: "Integrate with SHM", description: "Whether to integrate this partition with Smart Home Monitor", required: true)
metadata {
definition (name: "DSC Alarm Partition", namespace: "TenStartups", author: "Marc Lennox") {
marclennox / docker-compose.yml
Last active Jun 26, 2020
Using PRY remote seamlessly in a Rails server
View docker-compose.yml
# config/docker-compose.yml
hostname: rails-web
- application.env
- PORT=9292