Skip to content

Instantly share code, notes, and snippets.

View c4pone's full-sized avatar

Florian Kirchner c4pone

View GitHub Profile
from collections import defaultdict
from PIL import Image
import numpy as np
import sys
WHITE = 0
class UnionFind:
@c4pone
c4pone / chromecast volume menu tray
Created November 8, 2018 18:26
Quick and simpe way to get a regulate your chromecast audio over the menu tray
import rumps # rumps==0.2.1a0
import pychromecast # PyChromecast==2.3.0
chromecast = None
def get_chromecast(device_name):
chromecasts = pychromecast.get_chromecasts()
for chromecast in chromecasts:
if chromecast.device.friendly_name == device_name:

Keybase proof

I hereby claim:

  • I am c4pone on github.
  • I am c4pone (https://keybase.io/c4pone) on keybase.
  • I have a public key ASCUxfP5N4KTFTk1_UdnYbhxXL8-VBpY3iajPEUSZB-HiAo

To claim this, I am signing this object:

@c4pone
c4pone / logstash-template.json
Last active May 23, 2016 15:36 — forked from deverton/logstash-template.json
Logstash Elasticsearch Template
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index" : {
"query" : { "default_field" : "@message" },
"store" : { "compress" : { "stored" : true, "tv": true } }
}
},
@c4pone
c4pone / host_extractor.php
Created October 21, 2015 01:13
Extracts the host from a given url
<?php
/**
* Extracts the host from the given url>
*
* Example:
* http://codebuster.de/ = codebuster.de
* http://codebuster.de/test = codebuster.de
*
* @param string $url