Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #partial config | |
| server { | |
| listen 80; | |
| server_name -; | |
| location / { | |
| include uwsgi_params; | |
| uwsgi_pass 127.0.0.1:9090; | |
| uwsgi_param UWSGI_PYHOME /home/user/webpy_project_dir/env; | |
| uwsgi_param UWSGI_SCRIPT wsgi; | |
| uwsgi_param UWSGI_CHDIR /home/user/webpy_project_dir/; |
| # -*- coding:utf-8 -*- | |
| import sys, os | |
| import logging | |
| import logging.config | |
| import tornado | |
| import tornado.wsgi | |
| import tornado.httpserver | |
| import tornado.ioloop | |
| from tornado.options import define, options, parse_command_line |
| sudo cp nginx /etc/init.d/ | |
| sudo update-rc.d nginx defaults | |
| sudo chmod +x /etc/init.d/nginx | |
| /etc/init.d/nginx start |
| # 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)) |
| BTW yum has last Redis too, remi repository at least. | |
| $ sudo -i | |
| $ yum list redis | |
| $ redis.x86_64 2.6.13-1.el6.remi remi | |
| But today we want compile redis from source (see http://redis.io/download) | |
| $ yum install make gcc tcl | |
| $ cd /usr/local/src |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| var ids = document.querySelectorAll(".member_id"); | |
| var names = document.querySelectorAll(".member_name"); | |
| var output = "", length = ids.length; | |
| for(var i=0; i<length; i++){ | |
| output += ids[i].innerHTML.slice(1,-1) + ":" + names[i].innerHTML + "\n"; | |
| } | |
| console.log(output); |
| #!/bin/sh | |
| # | |
| # redis Startup script for Redis Server | |
| # | |
| # chkconfig: - 90 10 | |
| # description: Redis is an open source, advanced key-value store. | |
| # | |
| # processname: redis-server | |
| # config: /etc/redis.conf | |
| # pidfile: /var/run/redis.pid |
| #!/bin/bash | |
| # Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
| # Install stuff # | |
| ################# | |
| # Install development tools and some misc. necessary packages | |
| yum -y groupinstall "Development tools" | |
| yum -y install zlib-devel # gen'l reqs |