Skip to content

Instantly share code, notes, and snippets.

@JohNan
JohNan / motion-brightness.yaml
Last active Jan 17, 2022
Motion-activated light with brightness level
View motion-brightness.yaml
blueprint:
name: Motion-activated Light with brightness level
description: Turn on a light when motion is detected with a certain brightness level
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
View keybase.md

Keybase proof

I hereby claim:

  • I am johnan on github.
  • I am johnen (https://keybase.io/johnen) on keybase.
  • I have a public key ASDIjMkCdneOou9Qb3NxbAvyY3gOZTA14VIMZEn_mjOTvQo

To claim this, I am signing this object:

@JohNan
JohNan / QuickReturnRecyclerView.java
Created Nov 12, 2014
A simple RecyclerView where a Quick Return view can be added either at the top or the bottom. Inspired by https://github.com/LarsWerkman/QuickReturnListView
View QuickReturnRecyclerView.java
import android.content.Context;
import android.os.Build;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.TranslateAnimation;
import android.widget.FrameLayout;