This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/steipete/Aspects | |
// usage | |
// NCLibBase.hook(object: UIViewController.self, selector: #selector(UIViewController.viewDidLoad), with: .after) { (aspect) in | |
// if let instance = aspect.instance() as? UIViewController { | |
// print("viewDidLoad") | |
// print(instance.description) | |
// } | |
// } | |
import Foundation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*-coding:utf-8-*- | |
import tornado.web | |
from frame.region import region | |
from frame.region import Session | |
from frame.region import Flash | |
import services.user | |
class BaseRequestHandler(tornado.web.RequestHandler): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Redis = require('redis'); | |
var _ = require('underscore'); | |
var clazz = _require('util/class'); | |
var util = _require('util/util'); | |
var RedisUtil = clazz.create(); | |
var oRedisConf = nConf.account.redis; | |
_.extend(RedisUtil.prototype, { | |
// redis 可用状态 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
class HtmlDoc | |
attr_reader :root | |
def initialize(str = '') | |
if str.is_a?(String) | |
# 去掉一些特殊字符字符 | |
[ | |
/[\r\n]/, # 换行 | |
/<\s*!--.*?--\s*>/, # 注释 |