Debounce a function when you want it to execute only once after a defined interval of time. If the event occurs multiple times within the interval, the interval is reset each time.
Example A user is typing into an input field and you want to execute a function, such as a call to the server, only when the user stops typing for a certain interval, such as 500ms.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# http://www.opensource.apple.com/source/net_snmp/net_snmp-127/mibs/AIRPORT-BASESTATION-3-MIB.txt | |
# snmpwalk -v 2c -c public -m AIRPORT-BASESTATION-3-MIB 10.0.1.1 enterprises.apple.airport | |
$hostname = '10.0.1.1'; | |
$password = 'public'; | |
snmp_read_mib('/usr/share/snmp/mibs/AIRPORT-BASESTATION-3-MIB.txt'); | |
snmp_set_enum_print(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch) | |
--------- | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: ft=bash ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for BASH | |
# | |
# (Converted from ZSH theme by Kenny Root) | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dockerfile for Node-RED - pulls latest master code from git | |
# Use the node.js v4 LTS engine | |
FROM node:4-slim | |
MAINTAINER ceejay | |
RUN mkdir -p /root/.node-red | |
WORKDIR /root/.node-red | |
# download latest stable node-red | |
RUN npm install -g --unsafe-perm node-red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Fry; | |
use JsonStreamingParser\Listener; | |
/** | |
* This implementation allows to process an object at a specific level | |
* when it has been fully parsed | |
*/ | |
class ObjectListener implements Listener | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
# Import the device class from the component that you want to support | |
from homeassistant.components import light | |
from homeassistant.const import (STATE_OFF, STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, ATTR_ENTITY_ID) | |
CONF_NAME = 'name' | |
CONF_ENTITIES = 'entities' | |
_LOGGER = logging.getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Demonstration of debug_backtrace change in PHP 7. | |
* | |
* `call_user_func` and `call_user_func_array` do not appear as separate calls in the trace. | |
* | |
* @author Gregory Karpinsky (@tivnet) | |
*/ | |
main(); |
Add kiosk.js
file with the content below to your www
folder in config.
Like any other custom script, use ui-lovelace.yaml
resources section to reference the kiosk.js
file.
Make sure you add kiosk
somewhere in your URL. You can use it in the id of your view or in the query string.
OlderNewer