Skip to content

Instantly share code, notes, and snippets.

@collinpreston
collinpreston / lds-01-test-script.py
Created March 3, 2023 11:29
Python test script for testing the LDS-01 LiDAR unit
import serial
ser = serial.Serial("/dev/tty.usbserial-A50285BI", baudrate=230400)
def grab_data():
try:
unique_values = 0
distance_list = [None] * 360
while unique_values < 360:
@collinpreston
collinpreston / odl-realm-export-fully-local.json
Last active February 24, 2023 13:04
This is a realm export that can be used for MIT ODL local development with mitxonline
{
"id": "740fba76-3960-4984-b9b0-56679013ff85",
"realm": "local-development",
"displayName": "MIT Open Learning",
"displayNameHtml": "MIT Open Learning",
"notBefore": 0,
"defaultSignatureAlgorithm": "RS256",
"revokeRefreshToken": false,
"refreshTokenMaxReuse": 0,
"accessTokenLifespan": 300,
@collinpreston
collinpreston / keycloak-mit-odl-mitxonline-local-client.json
Created February 16, 2023 11:36
Client configuration for Keycloak to work with a local instance of mitxonline.
{
"clientId": "mitxonline-client-id",
"name": "MITxOnline",
"description": "Client configured for use with a locally running instance of mitxonline",
"rootUrl": "http://mitxonline.odl.local:8013",
"adminUrl": "",
"baseUrl": "http://mitxonline.odl.local:8013",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
@collinpreston
collinpreston / user-matadata-odl-keycloak.json
Last active February 16, 2023 18:45
Keycloak user metadata for MIT Open Learning MVP
{
"attributes": [
{
"name": "username",
"displayName": "${username}",
"validations": {
"length": {
"min": 3,
"max": 255
},
@collinpreston
collinpreston / openapi.yaml
Created February 14, 2023 16:40 — forked from xgp/openapi.yaml
OpenAPI specification for Keycloak account API
openapi: 3.0.2
info:
title: Keycloak Account API
version: 20.0.3
description: |
Derived from the code at https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/services/resources/account/AccountRestService.java
components:
securitySchemes:
access_token:
type: http