Skip to content

Instantly share code, notes, and snippets.

# Add the folowing helpers in Home Assistant:
# Name | Entity ID | Type
# ----------------------------------------------------------------------------------------------------------------
# wordclock_status | input_boolean.wordclock_status | input_boolean
# Wordclock IP | input_text.wordclock_ip | input_text (Min:0 Max:100,Text) Enter the IP-Adress of your Wordclock
# wordclock_ambi_b | input_number.wordclock_ambi_b | input_number (Min:0 Max:255, Step:1)
# wordclock_ambi_g | input_number.wordclock_ambi_g | input_number (Min:0 Max:255, Step:1)
# wordclock_ambi_r | input_number.wordclock_ambi_r | input_number (Min:0 Max:255, Step:1)
# wordclock_ambi_brightness | input_number.wordclock_ambi_brightness | input_number (Min:1 Max:255, Step:1)
# wordclock_display_b | input_number.wordclock_display_b | i
@01-Scripts
01-Scripts / shelly_blu_button1.yaml
Last active November 2, 2024 20:13
Shelly BLU Button1 Button Control (Press shortly once, twice, or three times, or press and hold for about 2 sec to emit a signal)
blueprint:
name: Shelly BLU Button1 Button Control (Press shortly once, twice, or three times, or press and hold for about 2 sec to emit a signal)
description: Automate actions using Shelly BLU Button1 with different press types.
domain: automation
input:
button_device:
name: Shelly BLU Button1
description: Select the Shelly BLU Button1 device.
selector:
device:
blueprint:
name: Shelly BLU RC-4 Button Control (Short, Long, and Double Press)
description: Automate actions using Shelly BLU RC-4's 4 buttons with different press types.
domain: automation
input:
button_device:
name: Shelly BLU RC-4
description: Select the Shelly BLU RC-4 remote.
selector:
device:
@01-Scripts
01-Scripts / functions.php
Last active May 3, 2020 14:18
Welcome file
<?PHP
function HelloWorld() {
echo "Hello World";
}
HelloWorld();
?>
@01-Scripts
01-Scripts / 01gallery.php
Last active July 13, 2016 20:32
Bildtitel unter dem Thumbnails anzeigen zulassen.
// Vorher (Zeile 471):
echo "<li".$class."><a ".$href." title=\"".$lightbox_title." - ".$echo_text."\">"._01gallery_getThumb($galverz,stripslashes($pics['filename']),"_tb")."</a></li>\n";
// Nachher
echo "<li".$class."><a ".$href." title=\"".$lightbox_title."\">"._01gallery_getThumb($galverz,stripslashes($pics['filename']),"_tb")."</a></li>\n";
@01-Scripts
01-Scripts / hook.php
Created August 18, 2015 19:34
Add Post Deploy-Hook as HTTP POST Notification for deployhq.com deploys. Put the following file in the root directory of your project or adjust the path in line 24.
<?PHP
$publicKey = "-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXJcP2N6NtcN26Q8nVaidXOA0w
RxWK2HQTblIaQdGRDjqTvhrSlFuV5N4jz7w/w8uskP20G7ZQ+CkHwIXrWk76KZJn
pdoOHPO6AqRmEFgV5Q6Y1CR77mvnT9O21hTnfzfyyiAdQC2oO8M9/jeLRPTAqmkG
xdQa8iepUz4BwrrHmwIDAQAB
-----END PUBLIC KEY-----";
// Verify integrity of Payload
$result = openssl_verify($_POST['payload'], base64_decode($_POST['signature']), $publicKey);
@01-Scripts
01-Scripts / content.php
Created August 8, 2015 15:41
Iframe-Höhe automatisch an Inhalt anpassen
<script type="text/javascript">
var giframe;
var gURL;
function periodicResize(iframe){
giframe = iframe;
setInterval(resizeIframe, 500);
}
function resizeIframe() {
if(giframe.contentWindow.document.body != null && giframe.contentWindow.document.body.scrollHeight > 0){
if(giframe.contentWindow.document.URL != gURL)
@01-Scripts
01-Scripts / secimg.php
Created August 4, 2014 19:09
Just use the following secimg.php instead of the original one to get a captcha only with numbers.
<?PHP
session_start();
$secCode = rand(100000,999999);
$_SESSION['antispam_'.$_GET['formid']] = md5($secCode);
// get from: http://www.01-scripts.de/01scripts/01pics/sec.jpg
$im = imagecreatefromjpeg("sec.jpg");
// get from: http://www.01-scripts.de/01scripts/01pics/verdanab.ttf
@01-Scripts
01-Scripts / new_css-code.css
Last active August 29, 2015 14:01
Neuer CSS-Code bei Update des 01-Artikelsystems auf Version 3.2.0
// Folgende zusaetzliche CSS-Eigenschaften muessen ggf. in eine externe CSS-Datei eingefuegt werden:
/* SLIMBOX */
#lbOverlay {
position: fixed;
z-index: 9999;
left: 0;
top: 0;
width: 100%;
@01-Scripts
01-Scripts / mantis_reconnect.php
Created June 7, 2013 18:03
Reconnect commits that were imported into Mantis using the Source integration plugin but weren't linked to the correct issues.
<?PHP
// MySQL-Einstellungen:
$host = "localhost"; //Host/Server ihrer Mysql-Datenbank
$database = "test"; //Datenbankname
$user = "user"; //Usernamen für Mysql-Datenbank
$passw = ""; //Passwort zur Mysql-Datenbank
$table = "mantis_plugin_source_changeset_table";