Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
class Application(tornado.web.Application): | |
def __init__(self): | |
tornado.web.Application.__init__(self, handlers, **settings) | |
self.db_session = db_session | |
self.redis = redis.StrictRedis() | |
self.session_store = RedisSessionStore(self.redis) | |
class BaseHandler(tornado.web.RequestHandler): |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
#!/usr/bin/env python | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
import pymongo | |
from pymongo import Connection | |
from pymongo.dbref import DBRef | |
from pymongo.database import Database | |
# connect | |
connection = Connection() | |
db = Database(connection, "things") | |
# clean up |
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
Usage: | |
fab deploy:appname | |
""" | |
from fabric.api import env, run, cd, local, put | |
env.hosts = ['myserver.com'] | |
env.user = 'eric' |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
" Vim syntax file | |
" Language: LESS Cascading Style Sheets | |
" Maintainer: Leaf Corcoran <[email protected]> | |
" Modifier: Bryan J Swift <[email protected]> | |
" URL: http://leafo.net/lessphp/vim/less.vim | |
" URL: http://gist.github.com/161047 | |
" Last Change: 2009 August 4 | |
" LESS by Leaf Corcoran | |
" CSS2 by Nikolai Weibull | |
" Full CSS2, HTML4 support by Yeti |