start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # Delete Archived Applications | |
| rm -r ~/Library/Developer/Xcode/Archives/*/ | |
| # Delete Devired Data | |
| rm -r ~/Library/Developer/Xcode/DerivedData/*/ | |
| # Delete Apple cached files | |
| rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/ |
| EMAIL_HOST = 'smtp.yandex.ru' | |
| EMAIL_HOST_USER = '[email protected]' | |
| EMAIL_HOST_PASSWORD = 'password' | |
| EMAIL_PORT = 465 | |
| EMAIL_USE_TLS = True |
| from flask import Flask, request, redirect, url_for, make_response, abort | |
| from werkzeug import secure_filename | |
| from pymongo import Connection | |
| from pymongo.objectid import ObjectId | |
| from gridfs import GridFS | |
| from gridfs.errors import NoFile | |
| ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
| DB = Connection().gridfs_server_test | |
| FS = GridFS(DB) |
| # create stub, then run flask app in tornado on port 5000 (perhaps with supervisord config below http://supervisord.org/index.html) | |
| #!/usr/bin/env python | |
| from tornado.wsgi import WSGIContainer | |
| from tornado.httpserver import HTTPServer | |
| from tornado.ioloop import IOLoop | |
| from myflaskapp import app | |
| http_server = HTTPServer(WSGIContainer(app)) |
| server { | |
| listen 80; | |
| server_name MY.WEBSITE.TLD; | |
| root /Users/ME/Sites/FOLDER; | |
| client_header_buffer_size 16k; | |
| large_client_header_buffers 16 16k; | |
| # qsa | |
| rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; |