$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
alias: Ashley’s Light Fader | |
description: > | |
Fades a lamp over time. If you have any questions or comments about this | |
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under | |
the Apache 2.0 license. (v2.0) | |
fields: | |
light: | |
name: 💡 Light | |
description: entity_id of the lamp. | |
selector: |
# Tested on Python 3.6.1 | |
# install: pip install --upgrade arabic-reshaper | |
import arabic_reshaper | |
# install: pip install python-bidi | |
from bidi.algorithm import get_display | |
# install: pip install Pillow | |
from PIL import ImageFont |
browser = request.user_agent.browser | |
version = request.user_agent.version and int(request.user_agent.version.split('.')[0]) | |
platform = request.user_agent.platform | |
uas = request.user_agent.string | |
if browser and version: | |
if (browser == 'msie' and version < 9) \ | |
or (browser == 'firefox' and version < 4) \ | |
or (platform == 'android' and browser == 'safari' and version < 534) \ | |
or (platform == 'iphone' and browser == 'safari' and version < 7000) \ |