These are field notes gathered during installation of website search facility for the ElasticSearch website.
You may re-use it to put a similar system in place.
The following assumes:
| from geventwebsocket.handler import WebSocketHandler | |
| from gevent.pywsgi import WSGIServer | |
| from flask import Flask, request, render_template | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return render_template('index.html') |
These are field notes gathered during installation of website search facility for the ElasticSearch website.
You may re-use it to put a similar system in place.
The following assumes:
| # If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
| PS1='\[\033[01;32m\]\h \[\033[01;34m\]\W' #\$ \[\033[00m\]' | |
| PS1=$PS1"\$(git branch 2>/dev/null | grep '^*' | colrm 1 2 | xargs -I {} echo ' (\[\033[01;31m\]'{}'\[\033[01;34m\])')" | |
| export PS1=$PS1" \$ \[\033[00m\]" | |
| # This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
| # host ~/code/web (beta_directory) $ git checkout master |
| # default server | |
| server { | |
| listen 80; | |
| server_name dev.kohana.framework; | |
| root /mnt/hgfs/Projects/kohana; | |
| access_log /var/log/nginx/dev.kohana.framework.access.log; | |
| error_log /var/log/nginx/dev.kohana.framework.error.log; | |
| location / { |