###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
const { createLogger, format, transports } = require("winston"); | |
// https://github.com/winstonjs/winston#logging | |
// { error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 } | |
const level = process.env.LOG_LEVEL || "debug"; | |
function formatParams(info) { | |
const { timestamp, level, message, ...args } = info; | |
const ts = timestamp.slice(0, 19).replace("T", " "); |
#!/bin/bash -e | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
NAME=blink | |
DIR=/home/pi | |
PIDFILE=/home/pi/$NAME.pid | |
DAEMON=/home/pi/pi_gpio_hack.py | |
DAEMON_ARGS="[[31,0,37,1],[31,1,37,0]]" | |
STOP_SIGNAL=INT |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
if __name__ == "__main__": | |
reactor_args = {} | |
def run_twisted_wsgi(): | |
from twisted.internet import reactor | |
from twisted.web.server import Site | |
from twisted.web.wsgi import WSGIResource | |
resource = WSGIResource(reactor, reactor.getThreadPool(), app) | |
site = Site(resource) |