Skip to content

Instantly share code, notes, and snippets.

View tubit's full-sized avatar

Dennis Konert tubit

View GitHub Profile
esphome:
name: esphome-web-XXX
friendly_name: MatrixClock
esp8266:
board: esp01_1m
# Enable logging
logger:
@tubit
tubit / zigbee2mqtt_Ikea_Tradfi_Switch.yaml
Last active January 22, 2023 21:42
zigbee2mqtt_Ikea_Tradfi_Switch
blueprint:
name: 'Z2M IKEA Shortcut Button E1812'
description: "Blueprint for Ikea Tradfri Shortcut Button E1812. You can put several actions to each single press, double press and log press."
domain: automation
input:
button:
name: Remote
description: IKEA Shortcut Button to use (e.g sensor.kitchen_remote_action)
selector:
@tubit
tubit / mz_invisible_widget.js
Created September 29, 2020 08:53 — forked from mzeryck/mz_invisible_widget.js
A Scriptable script that creates "invisible" widget backgrounds based on your iOS wallpaper, and then either uses them as a Scriptable widget background or exports to your camera roll.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-purple; icon-glyph: image;
// This widget was created by Max Zeryck @mzeryck
// Widgets are unique based on the name of the script.
const filename = Script.name() + ".jpg"
const files = FileManager.local()
const path = files.joinPath(files.documentsDirectory(), filename)
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-purple; icon-glyph: image;
// This widget was created by Max Zeryck @mzeryck
/*
* Change the widget settings and test out the widget in this section.
* ===================================================================
*/
@tubit
tubit / Coronavirus.js
Created September 22, 2020 13:48 — forked from planecore/Coronavirus.js
Coronavirus Scriptable Widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: user-md;
// change "country" to a value from https://coronavirus-19-api.herokuapp.com/countries/
const country = "Germany"
const url = `https://coronavirus-19-api.herokuapp.com/countries/${country}`
const req = new Request(url)
const res = await req.loadJSON()
if (config.runsInWidget) {
@tubit
tubit / gist:9888871
Created March 31, 2014 09:43
keybase.md
### Keybase proof
I hereby claim:
* I am tubit on github.
* I am tubit (https://keybase.io/tubit) on keybase.
* I have a public key whose fingerprint is 2712 F931 3256 9452 2AC6 09DB C3AD 2331 E4BB BFEC
To claim this, I am signing this object:
@tubit
tubit / only_start_of_not_already_running
Created July 23, 2013 22:50
Create file lock on file to prevent concurrent script runs.
#!/usr/bin/env ruby
DATA.flock(File::LOCK_EX | File::LOCK_NB) or abort "Already running."
trap("INT", "EXIT")
puts "Running..."
loop do
sleep
end
@tubit
tubit / pre-commit-hook-puppet
Last active December 20, 2015 03:49
puppet git pre-commit hook
#!/bin/bash
# Assumptions:
#
# Puppet >= 2.7 is installed on this machine
# puppet-lint is installed on this machine
# ERB is installed on this machine
# git is installed on this machine
# sed is installed on this machine
# Adjust LINTFLAGS as appropriate
PUPPETDB
puppet:
apt-get update
apt-get install puppet
puppet resource package puppetdb ensure=latest
## postgreSQL konfigurieren:
apt-get install postgresql-8.4
### ruby 1.9.2 from debian
~# apt-get install ruby1.9.1-full
~# gem1.9.1 install bundler --no-rdoc --no-ri
~# gem1.9.1 install passenger --no-rdoc --no-ri
### apache dev headers + curl-dev for mod_passenger
~# apt-get install libapr1-dev apache2-prefork-dev libcurl4-openssl-dev
~# cd /opt/graylog2-web-interface
~# chown -R 33.33 /opt/graylog2-web-interface