Why?
Because we wanted to achive the following while developing a webapp using websockets:
Static serving (nginx), Django application (gunicorn) and Websockets service (twisted)
- on the same IP
self.name = os.path.split(self.remote_path)[1] | |
download_temp = files.temp.NamedTemporaryFile(delete=True) | |
download_temp.write(urllib2.urlopen(self.remote_path).read()) | |
download_temp.flush() | |
self.image_original.save(self.name, files.File(download_temp)) | |
im=Image.open(self.image_original.path) | |
im.thumbnail((settings.POSTER_THUMBSIZE['x'], settings.POSTER_THUMBSIZE['y']), Image.ANTIALIAS) | |
img_temp = files.temp.NamedTemporaryFile(delete=True) | |
im.save(img_temp,'jpeg') | |
img_temp.flush() |
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
CHECKS = [ |
*.acn | |
*.acr | |
*.alg | |
*.aux | |
*.bbl | |
*.blg | |
*.dvi | |
*.glg | |
*.glo | |
*.gls |
switch: | |
- platform: dlink | |
name: coffee | |
host: x.x.x.x | |
username: admin | |
password: !secret dlink_password | |
sensor: | |
- platform: template | |
sensors: |
esphomeyaml: | |
name: coffee_machine | |
platform: ESP8266 | |
board: esp12e | |
wifi: | |
ssid: 'ssid' | |
password: '123456' | |
domain: .lan |
esphome: | |
name: loop | |
platform: ESP8266 | |
board: d1_mini | |
wifi: | |
ssid: 'WLAN SSID' | |
password: 'wlan password' | |
domain: .lan |