Skip to content

Instantly share code, notes, and snippets.

View rvdlee's full-sized avatar

Rob van der Lee rvdlee

View GitHub Profile
@rvdlee
rvdlee / timed_motion_light_plus_light_strength_brightness.yaml
Created April 9, 2021 08:42
Adding dimtime to the original script.
blueprint:
name: Timed Motion-activated Dimmable Light
description: Turn on a light when motion is detected within a certain time contraint.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
input:
motion_entity:
name: Motion Sensor
selector:
entity:
blueprint:
name: Timed Motion-activated Light
description: Turn on a light when motion is detected within a certain time contraint.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
# Encoding piped string
cat myexamplefile.txt | base64
# Decoding piped string
cat mybase64encodedfile.txt | base64 -d
public function unreadable(string $name, int $number, AwesomeInterface $object)
{
// Magic
}
public function readable(
string $name,
int $number,
AwesomeInterface $object
) {
```yaml
%class=line-numbers
product:
- sku : BL394D
quantity : 4
description : Basketball
price : 450.00
- sku : BL4438H
quantity : 1
description : Super Hoop
apt-get moo
_ _
(_\___( \,
)___ _ Have you smashed some milk today?
/( (_)-(_) /
,---------' \_
//( ',__,' \ (' ')
// ) '----'
'' ; \ .--. ,/
| )',_,'----( ;
```bash
%data-src=https://gist.githubusercontent.com/EpicSoftworks/15247d7a9acc8e316f7522e4d17a144c/raw/99cb2c96b2910b25cb2f63163a2a2deabd616d98/pelican-prismjs-example-filehighlight-code
%data-host=localhost
%data-user=rob
%data-output=2-20
```
```javascript
%data-line=1,3-4
try {
alert("Welcome guest!");
} catch(err) {
document.getElementById("demo").innerHTML = err.message;
}
```