Skip to content

Instantly share code, notes, and snippets.

View yishenggudou's full-sized avatar
🍺
Looking for a partner

Abigail Smithson yishenggudou

🍺
Looking for a partner
View GitHub Profile
/**
* @author timger <[email protected]>
* @timger http://weibo.com/zhanghaibo
* twitter @yishenggudou http://twitter.com/yishenggudou
* @yishenggudou http://twitter.com/yishenggudou
* Copyright (c) 2008-2011 timger - released under MIT License
*/
(
function ($, window)
window.rule_text_popup = function(){
<?php
/**
* 解析 视频信息 类
*
* 支持 优酷, 土豆 酷6 56 新浪 qq播客 乐视 乐视
**/
class class_video{
// 超时时间
/**
* @author timger <[email protected]>
* @timger http://weibo.com/zhanghaibo
* twitter @yishenggudou http://twitter.com/yishenggudou
* @yishenggudou http://twitter.com/yishenggudou
* Copyright (c) 2008-2011 timger - released under MIT License
*/
(
function ($, window)
window.rule_text_popup = function(){
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="/styles/cmx.css"/>
<script src="/scripts/cmx.js"></script>
<body>
<div style="max-width:700px; -webkit-transform:rotate(1deg);">
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">One lazy morning</tspan>
#!/usr/bin/env python
"""This is a demonstration of sharing file descriptors across processes.
It uses Tornado (need a recent post-2.0 version from github) and the
multiprocessing module (from python 2.6+). To run it, start one copy
of fdserver.py and one or more copies of testserver.py (in different
terminals, or backgrounded, etc). Fetch http://localhost:8000 and
you'll see the requests getting answered by different processes (it's
normal for several requests to go to the same process under light
load, but under heavier load it tends to even out).
import tornado.web
import tornado.httpserver
import tornado.ioloop
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Greetings from the instance %s!" % tornado.process.task_id())
app = tornado.web.Application([
(r"/", MainHandler),
# Copyright (c) 2009-2010 Denis Bilenko. See LICENSE for details.
"""UDP/SSL server"""
import sys
import errno
import traceback
from gevent import socket
from gevent import core
from gevent.baseserver import BaseServer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 timger
# +Author timger
# +Gtalk&Email [email protected]
# +Msn [email protected]
# +Weibo @timger http://t.sina.com/zhanghaibo
# +twitter @yishenggudou http://twitter.com/yishenggudou
# Licensed under the MIT License, Version 2.0 (the "License");
[[email protected] nginx]# cat conf/fastcgi_params
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
************************************************************/
2013-03-12 19:25:06,255 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = master/10.10.131.224
STARTUP_MSG: args = []
STARTUP_MSG: version = 1.0.4
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0 -r 1393290; compiled by 'hortonfo' on Wed Oct 3 05:17:59 UTC 2012
************************************************************/
2013-03-12 19:25:06,434 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties