Skip to content

Instantly share code, notes, and snippets.

@underscorejasiu
underscorejasiu / momentary_binary_sensor_trigger.yaml
Last active September 7, 2025 10:48
Creates a momentary "on" state from a binary sensor trigger. Turns on a helper input_boolean for a short time, then turns it off automatically. If the source sensor turns off earlier, the helper is turned off immediately. Very helpful with door sensors that triggers some automation but your kids don't know how to close doors after each visit in …
blueprint:
name: Momentary Binary Sensor Trigger
description: >
Creates a momentary "on" state from a binary sensor trigger. Turns on a helper
input_boolean for a short time, then turns it off automatically.
If the source sensor turns off earlier, the helper is turned off immediately.
Very helpful with door sensors that triggers some automation
but your kids don't know how to close doors after each visit in toilet.
To make it work with binary sensors groups you also need translate helper
from switch to direct binary sensor. To do it you need to make
@underscorejasiu
underscorejasiu / index.html
Last active August 15, 2018 10:32
Quick test of string interning in javascript engines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test of string interning</title>
</head>
<body>
<h1>Test of string interning</h1>
<p>It's a test of memory allocating with JS engines in modern browser - if there is working string interning or not, and if yes when it it.</p>
<p>To check it properly you should pause with debugger before every assign and look at memory profile if it's increasing by the same value or not.</p>
@underscorejasiu
underscorejasiu / client.html
Created April 4, 2016 10:02 — forked from diorahman/client.html
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');