Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/bin/sh | |
| # | |
| # git autodeploy script when it matches the string "[deploy]" | |
| # | |
| # @author icyleaf <[email protected]> | |
| # @link http://icyleaf.com | |
| # @version 0.1 | |
| # | |
| # Usage: | |
| # 1. put this into the post-receive hook file itself below |
| # 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)) |
| sudo cp nginx /etc/init.d/ | |
| sudo update-rc.d nginx defaults | |
| sudo chmod +x /etc/init.d/nginx | |
| /etc/init.d/nginx start |
| #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 |
| /* ivan(a.t)mysqlab.net */ | |
| package main | |
| import ( | |
| "syscall" | |
| "os" | |
| "log" | |
| ) | |
| func daemon(nochdir, noclose int) int { |
| { | |
| "china,canton,guangzhou": "guangdong", | |
| "shenzhen,guangdong,china": "guangdong", | |
| "china,,\u82cf\u5dde": "jiangsu", | |
| "peking,china": "beijing", | |
| "pudong,district,,shanghai,,china": "shanghai", | |
| "beijing,.china": "beijing", | |
| "huadu,district,guangzhou,guangdong,china": "guangdong", | |
| "beihang,university,,beijing,,china": "beijing", | |
| "shanghai,china": "shanghai", |
| { | |
| "Taipei,Taiwan": "TW", | |
| "Vancouver": "CA", | |
| "SF,/,BOS,/,NYC,/,LA": "BO", | |
| "Omaha,NE": "NE", | |
| "China,Canton,Guangzhou": "CN", | |
| "Arkansas": "US", | |
| "Beijing,China": "CN", | |
| "Waco,TX": "US", | |
| "Ancona,Italy": "IT", |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| // Playground - noun: a place where people can play | |
| import UIKit | |
| class ViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource | |
| { | |
| var tableView: UITableView! | |
| var items: NSMutableArray! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |