I hereby claim:
- I am jeremy-walton on github.
- I am jeremywalton (https://keybase.io/jeremywalton) on keybase.
- I have a public key ASAOHjjDJpy3ySZt1GzpY1mHY2xXWOCAOFP1_csmE7FtMgo
To claim this, I am signing this object:
| require 'octokit' | |
| require 'httparty' | |
| require 'json' | |
| require 'csv' | |
| # GitHub API configuration | |
| ACCESS_TOKEN = 'xxxxxxxxxxxxx' | |
| ORGANIZATION = 'RoleModel' | |
| # Octokit currently does not support the properties API |
| import { Controller } from "@hotwired/stimulus" | |
| export default class extends Controller { | |
| static values = { | |
| shouldOpen: Boolean, | |
| isOpen: Boolean, | |
| } | |
| connect() { | |
| if (this.shouldOpenValue) { |
| .m3card.m3card--filled-plus-3.m3card--elevated | |
| img.m3card__image src="https://i.scdn.co/image/ab67616d0000b273339cc033bcc476d11dffba4c" | |
| h2.m3card__headline The Battle at Garden's Gate | |
| h2.m3card__subhead Greta Van Fleet | |
| .m3card__supporting-text | |
| span 2021 · 12 songs · 1 hr 3 min |
| /* | |
| This is inspired by https://kentcdodds.com/blog/the-state-initializer-pattern | |
| The interface to using this would look like: | |
| ``` | |
| const [reset, initialState] = useResettable({ | |
| count: [setCount, initialCount], | |
| someOtherStateVariable: [setSomeOtherStateVariable, initialSomeOtherStateVariable], | |
| }) | |
| ``` | |
| Where count is a state variable that exists. `initialCount` can be a prop passed to whatever |
I hereby claim:
To claim this, I am signing this object:
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: </home/pi/raspberry-occupi.py> | |
| # Required-Start: $all | |
| # Required-Stop: | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Manage my cool stuff | |
| ### END INIT INFO |
| import requests | |
| import time | |
| import json | |
| import RPi.GPIO as io | |
| io.setmode(io.BCM) | |
| door_pin = 18 | |
| closed_pin = 23 | |
| opened_pin = 24 | |
| url = "http://occupi.herokuapp.com/api/door_statuses" |