Skip to content

Instantly share code, notes, and snippets.

View noestreich's full-sized avatar

noestreich

  • Berlin
View GitHub Profile
@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 / Berlin_2018_girls.csv
Last active February 13, 2019 22:17
First names (girls) in Berlin, Germany in 2018 - Data source: https://github.com/berlinonline/haeufige-vornamen-berlin/tree/master/data/cleaned
NAME COUNT
Marie 656
Sophie 541
Charlotte 467
Maria 439
Emilia 389
Anna 301
Emma 281
Mia 265
Johanna 256
NAME COUNT
Alexander 439
Maximilian 368
Paul 363
Emil 338
Elias 316
Anton 294
Noah 286
Leon 278
Karl 252
@noestreich
noestreich / index.html
Created March 23, 2018 17:13
Teleweb - Einfache HTML-Seite zum Abspielen von TV Livestreams
<!doctype html>
<html lang="en">
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.css" rel="stylesheet">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="apple-mobile-web-app-capable" content="yes">
@noestreich
noestreich / rufnummern-mit-vorwahl.scpt
Last active August 21, 2018 13:21
AppleScript ergänzt Rufnummern die mit 0 starten mit Ländervorwahl +49
set vorwahl to "+49"
tell application "Contacts"
repeat with aPerson in people
set thePhones to phones of aPerson
if thePhones is not {} then
set errorList to {}
repeat with aPhoneNumber in thePhones
set theNumber to value of aPhoneNumber
if (characters 1 thru 1 of theNumber) as string is "0" then
#!/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):
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
{
"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/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())