Skip to content

Instantly share code, notes, and snippets.

View metcalf's full-sized avatar

Andrew Metcalf metcalf

  • Stripe Inc.
  • San Francisco, CA
View GitHub Profile
@metcalf
metcalf / ra3_double_tap.yaml
Last active August 25, 2025 18:06
Home Assistant RA3 double tap blueprint
blueprint:
name: "Lutron Double Tap"
description: >
Implements a double tap event from Lutron RA3 keypads. Since RA3 doesn't emit double-tap events
for "Scene" and "Zone" buttons, this blueprint simulates the behavior by detecting rapid button
presses and preserving the light states from after the first press.
domain: automation
input:
<p>This is my page</p>
<iframe name="result" frameborder="0" src="http://fiddle.jshell.net/DUR3y/show/"></iframe>
@metcalf
metcalf / app.py
Last active August 29, 2015 13:57 — forked from maccman/app.py
import os
from flask import Flask, render_template, request
import stripe
stripe_keys = {
'secret_key': os.environ['SECRET_KEY'],
'publishable_key': os.environ['PUBLISHABLE_KEY']
}
stripe.api_key = stripe_keys['secret_key']