Skip to content

Instantly share code, notes, and snippets.

@byteturtle
byteturtle / spacestatus.py
Last active October 19, 2018 22:04
SpaceAPI compatible Spacestatus for BitBar
#!/usr/local/bin/python3
import json
from urllib.request import urlopen
request = urlopen("http://status.schaffenburg.org/spaceapi.php")
json = json.loads(request.read())
status = json['state']['open']
print (status and "space open | color=green" or "space closed | color=red")
#!/bin/bash
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
nocolor='\033[0m'
status=$(curl -s http://status.schaffenburg.org)
if [ "$status" == "verriegelt" ]; then
status="${red}closed${nocolor}"
else
status="${green}open${nocolor}"

Keybase proof

I hereby claim:

  • I am byteturtle on github.
  • I am byteturtle (https://keybase.io/byteturtle) on keybase.
  • I have a public key ASBARTjjcyiI5QMdBJ9D_7jZsAnmDm7hY2k5qk_IH225AQo

To claim this, I am signing this object:

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA