系统运维
文章平均质量分 69
dicc9527
这个作者很懒,什么都没留下…
展开
-
http状态码说明
part of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al.10 Status Code DefinitionsEach Status-Code is described below, including a description of which method(s) it can follow and原创 2013-08-07 16:49:57 · 664 阅读 · 0 评论 -
更改http返回内容,按匹配行增加用户访问时的域名和相对路径
string.split = function(s, p) local rt= {} string.gsub(s, '[^'..p..']+', function(w) table.insert(rt, w) end ) return rtendlocal function geturl(s,p) local n=1 local m=1 whil原创 2014-09-23 17:17:49 · 482 阅读 · 0 评论 -
python 多线程http失败切换功能
import threadingimport timegj=0lock=threading.Lock()def g_num(j=0): global gj if j==1: if lock.acquire(): gj+=1 lock.release()class TestThread(threading.Th原创 2014-11-18 17:23:51 · 612 阅读 · 0 评论 -
nginx proxy_cache配置
http{proxy_cache_path /opt/nginxcache/livets levels=1:2 keys_zone=livecontent:50m inactive=1d max_size=10g;}原创 2014-11-18 17:19:17 · 449 阅读 · 0 评论 -
web.py简用
import web,sysimport jsonsys.path.append('/opt/bin')sys.path.append('/opt/web/pyweb')import twodaysclips#import getchannelsimport QiyiDownClipsurls = ( '/(.*)', 'hello')app = web.applica原创 2014-11-21 08:06:31 · 561 阅读 · 0 评论 -
shell脚本中echo显示内容带颜色
shell脚本中echo显示内容带颜色显示,echo显示带颜色,需要使用参数-e 格式如下: echo -e "\033[字背景颜色;文字颜色m字符串\033[0m" 例如: echo -e "\033[41;36m something here \033[0m" 其中41的位置代表底色, 36的位置是代表字的颜色 注: 1、字背景颜色和文字转载 2015-09-23 11:10:39 · 474 阅读 · 0 评论