Skip to content

Instantly share code, notes, and snippets.

View noestreich's full-sized avatar

noestreich

  • Berlin
View GitHub Profile
tell application "Photos"
activate
-- Add the photo you want to search for to a top level album as the first item in the album
set resultcaption to "Searching for: "
try
set sel to selection
if sel is {} then error "The selection is empty" -- no selection
@noestreich
noestreich / fbled.css
Created January 19, 2017 12:58
Fritz!Box LED-Schalter
header {
width:100%;
position:relative;
top:0;
left:0;
background-color:#006ec0;
color:white;
font-size:50px;
text-align:center;
font-family:Arial;
@noestreich
noestreich / gqs.html
Created January 19, 2017 12:57
Fritz!Box LED-Schalter
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" type="image/x-ico" href="http://fritz.box/favicon.ico" />
<link rel="stylesheet" type="text/css" href="fbled.css" /> <title></title>
<script type="text/javascript">
function getQuerystring(key, default_) {
if (default_==null) default_="";
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
@noestreich
noestreich / index.html
Last active May 31, 2021 10:09
Fritz!Box LED-Schalter
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>FritzBox LEDs an/aus</title>
<link rel="shortcut icon" type="image/x-ico" href="http://fritz.box/favicon.ico" />
<link rel="stylesheet" type="text/css" href="fbled.css" />
</head>
<body>
<header>
<img src="http://fritz.box/favicon.ico" width="32" height="32" alt="Keine Fritz!Box erkannt">Fritz!Box LED-Schalter
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"right_option": "delete_forward"
}
}
]
#ZDF
http://zdf0304-lh.akamaihd.net/i/de03_v1@392855/master.m3u8?dw=0
http://zdf0304-lh.akamaihd.net/i/de04_v1@392856/master.m3u8?dw=0
http://zdf0506-lh.akamaihd.net/i/de05_v1@392857/master.m3u8?dw=0
http://zdf0506-lh.akamaihd.net/i/de06_v1@392858/master.m3u8?dw=0
http://zdf0708-lh.akamaihd.net/i/de07_v1@392868/master.m3u8?dw=0
http://zdf0708-lh.akamaihd.net/i/de08_v1@392869/master.m3u8?dw=0
#NDR Spezial
http://ndr_spezial-lh.akamaihd.net/i/spezial_1@119227/master.m3u8
http://ndr_spezial-lh.akamaihd.net/i/spezial_2@119228/master.m3u8
#!/usr/bin/python
#-*- coding: utf-8 -*-
import pygame, soco
from pygame.locals import *
### Sonos im Netzwerk finden
speakers = soco.discover()
### Sonos Status und Playlist-Infos
def is_playing(transport_info):
@noestreich
noestreich / VPN_On_Demand.xml
Last active April 7, 2024 23:20
Der VPN-On-Demand Codeblock zur Integration in eine Profildatei. Siehe: http://www.iphone-ticker.de/?p=97462
<!-- VPN-On-Demand Codeblock -->
<key>OnDemandEnabled</key>
<integer>1</integer>
<key>OnDemandRules</key>
<array>
<!-- VPN beim Zugriff auf Heimnetz-Adressen aufbauen -->
<dict>
<key>Action</key>
<string>EvaluateConnection</string>
<key>ActionParameters</key>
@noestreich
noestreich / FritzboxVPN.mobileconfig.xml
Last active March 13, 2022 18:33
Eine Profildatei zum Regeln von VPN-on-Demand Verbindungen zwischen iPhone und FRITZ!Box. Siehe: http://www.iphone-ticker.de/?p=97462
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IPSec</key>
<dict>
<key>AuthenticationMethod</key>
#!/usr/bin/env python
import urllib, json, datetime, time, os, soco
# HUE Bridge IP
url = 'http://192.168.1.48/api/newdeveloper'
response = urllib.urlopen(url)
data = json.loads(response.read())
button = data['sensors']['3']['state']['buttonevent']
klickzeit = data['sensors']['3']['state']['lastupdated']
klickzeitunix = time.mktime(datetime.datetime.strptime(klickzeit, "%Y-%m-%dT%H:%M:%S").timetuple())
timestamp = int(time.time())