Skip to content

Instantly share code, notes, and snippets.

@sethiele
sethiele / lovelace_xmas_dashboard.yaml
Created November 30, 2023 13:45
Spiele Weihnachtslieder (Musik) über einen Button im UI.
- type: vertical-stack
title: Weihnachtsmusik
cards:
- type: entities
entities:
- entity: input_select.player_auswahl # Ein Input Select Helper mit der Liste der Speaker
- type: grid
cards:
- type: picture
image: https://i.scdn.co/image/ab67706f000000022548f76332c45eb3d57dba43 # Spotify-Cover
global:
instanceName: RAUMNAME
integrations:
- homeAssistant
- bluetoothLowEnergy
homeAssistant:
mqttUrl: 'mqtt://mqtt_broker_ip:mqtt_broker_port'
mqttOptions:
username: mqtt_broker_user
@sethiele
sethiele / Unassigne-on-State-Change.js
Last active July 6, 2018 08:16
YouTrack Workflows
var entities = require('@jetbrains/youtrack-scripting-api/entities');
var workflow = require('@jetbrains/youtrack-scripting-api/workflow');
exports.rule = entities.Issue.onChange({
title: workflow.i18n('Remove Assignee on move'),
guard: function(ctx) {
var issue = ctx.issue;
return issue.fields.isChanged(ctx.Stage);
},
action: function(ctx) {
@sethiele
sethiele / disable-shadow-on-mac-screenshots.md
Last active July 14, 2016 06:40
This is how to disable the shadow on mac screenshots.
  1. open th terminal
  2. run defaults write com.apple.screencapture disable-shadow -bool TRUE
  3. run killall SystemUIServer

Done

Enable the shaddow again (why ever):

  1. open th terminal
  2. run defaults write com.apple.screencapture disable-shadow -bool FALSE
#!/usr/bin/env ruby
# Speedtest cli to ifttt.com wrapper
# based on https://github.com/HenrikBengtsson/speedtest-cli-extras
# More: https://www.iamyourfather.de/dsl-speedtest-mit-dem-raspberry-pi (german)
# Original: http://makezine.com/projects/send-ticket-isp-when-your-internet-drops/
require 'json'
secret_key = "XXXXXXXXXXX"
speedtest = `/usr/local/bin/speedtest-cli --share`
@sethiele
sethiele / wordpress-yoast-fokosword-sql.sql
Last active September 7, 2015 08:51
This SQL-Code returns a List of all Wordpress posts with a Yoast-SEO Fokus Keyword and the URL of the post. You Can download it as CSV (in MySQLAdmin).
SET @domain="https://www.example.org/";
SELECT meta.post_id AS 'PostID', meta.meta_value AS 'Fokus Keyword', post.post_title AS 'Title', Concat(@domain, post.post_name) as "URL"
FROM wp_postmeta AS meta, wp_posts as post
WHERE meta.meta_key = '_yoast_wpseo_focuskw'
AND post.ID = meta.post_id
AND post.post_status = 'publish'
ORDER BY post.post_date ASC

Keybase proof

I hereby claim:

  • I am sethiele on github.
  • I am sethiele (https://keybase.io/sethiele) on keybase.
  • I have a public key whose fingerprint is A33E 5998 F8A9 FC2F 5505 297F F79B 86D7 9FC1 627E

To claim this, I am signing this object:

@sethiele
sethiele / gpg-ip-support.md
Last active June 19, 2016 05:06
Infopark Support GPG

#Mit GPG verschlüsselte Informationen an den Infopark Support senden

Wenn Ihr wichtige Dinge an den Support senden wollt, dann verschlüsselt diese bitte per GPG.

Am einfachsten geht ihr dafür folgendermaßen vor:

  1. Ladet euch die GPG-Keys der Supporter herunter:
    0x6339A4E9 Anne Schulz
    0x6C92D54D Bartek Ochab
    0x0262A434 Dirk Nitschle
@sethiele
sethiele / legacy_url_proxy.rb
Created March 4, 2014 09:28
Ruby Redirect Proxy
# encoding: utf-8
class LegacyUrlProxy
URL_MAPPING = {
'//surgeons-for-africa.com' => '//surgeons-for-africa.org',
}
def initialize(app)
@app = app
end